SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-22-10, 02:48 PM   #11
ferg
Watch
 
Join Date: Dec 2007
Posts: 19
Downloads: 148
Uploads: 0
Default

This is a fairly minor bug, but it's irritating and should be fixed. When I give a speed command, it moves my mouse pointer. Since it uses a key command, it shouldn't touch the mouse at all. This is really problematic when I am using a view. For example, let's say I'm viewing a merchant through the scope and order "Ahead 1/3". My view jerks violently away from the target. There's no reason for this, is there? It's an awful work-around to have to release the view, give the throttle order, and then reacquire the view again.

Output is:

Code:
Ahead one third (20, KEY) voice command detected at +4.08 seconds
        Ahead one third (voice_command.csv id = 20)
                Adding 584 Move Mouse Away
        Type is KEY, data is 1
                1 is key sequence for voice command Ahead one third from key_commands.csv
                1 is a single-key sequence
                        Pressing key 1 (virtual key code 0x31) from key_codes.csv
                                Running key() sequence for 1
        Type is MOUSEMOVE, data is 928,582
                928,582 are mouse coordinates for voice command Ahead one third from command_bar.csv or dials.csv
                Mouse clicking at 928,582 for Move Mouse Away (id=584)
        Phrase processed.  Listening...
Note the "Type is MOUSEMOVE" block. This shouldn't happen.


-- Looks like I edited this in before Billko replied. Whoops! --
I think the problem is here in voice.pl:

Code:
if (
               
               ($TYPE{$original_id} =~ /BUTTON/i || $TYPE{$original_id} =~ /DIAL/i
               
               || ($original_id >= 19 && $original_id <= 28) # Telegraph reversion
               
               ) &&
                $original_id != 580 && $original_id != 581 && $original_id != 582 && $original_id != 583) {
               print "\t\tAdding 584 $NAME{584}\n";
               push(@ids, 584); # Move Mouse Away
            }
If the ID is between 19 and 28 inclusive, a mouse move is added. Because minsc kindly included the source, I think I can fix this for myself if I download the necessary compiler; but I think a fix to the official version would benefit all. It's also possible that I'm completely missing something. Maybe there's a reason for this mouse move? I can't imagine what it is.

I'd also make a suggestion from a software design point of view. If per-item mouse move functionality is desired, why not external it in the CSV? If I could just change a mouse move column from "true" to "false" in one of the files, that'd be a lot easier than learning perl and recompiling the script to modify the hardcoding.

Once again, thank you, minsc, for this utility!

Last edited by ferg; 03-22-10 at 03:00 PM.
ferg is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.