patchBos Wars - Patches: patch #8317, Fixed Command Line Speed Option

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8317: Fixed Command Line Speed Option

Submitter:  Doug <zerted>
Submitted:  Mon 17 Feb 2014 01:11:26 PM UTC
   
 
Open/Closed:  Closed Status:  Done
Assigned to:  feb

Sat 22 Feb 2014 08:28:32 PM UTC, comment #3: 

Implemented the fix like suggested in comment #2.

Passing the arguments to lua would have been better and more flexible. That will be for another day.

Thanks for the patch.

François Beerten <feb>
Group administrator
Fri 21 Feb 2014 10:12:29 PM UTC, comment #2: 

I wasn't very clear in comment #1. I meant, let the lua script see if the GameSpeed was set via the command line or not. If not configured by the command line, GameSpeed could be set to 0 and lua could set the value from preferences or the default value (100).

François Beerten <feb>
Group administrator
Fri 21 Feb 2014 10:00:46 PM UTC, comment #1: 

Thank you for the patch. The -S option is indeed broken.

This patch will break the options menu where the game speed can be adjusted. In addition, the forced game speed will be stored into the preferences.

We need to solve this differently. For example let LUA set the GameSpeed only if it wasn't set before via the command line. In that case, lua would have also to connfigure the default speed instead of the engine. Another possibility may be to call lua with the command line arguments and let lua set the speed. Need to think about what is the best solution. Are other cli arguments affected ?




François Beerten <feb>
Group administrator
Mon 17 Feb 2014 01:11:26 PM UTC, original submission:  

Issue:
The -S option sets VideoSyncSpeed, but when the Lua preferences are loaded, boswars.lua's call to SetGameSpeed() wipes out the previously set VideoSyncSpeed. 

Fix:
Added a boolean (ForceGameSpeed) to indicate if -S was used.
Used ForceGameSpeed to skip the SetGameSpeed() change.

Details:
Prevents SetGameSpeed() from changing the game speed when -S was used, but the user can still change the speed when ingame.

Possible Issues:
The command line speed gets saved as the new speed preference.

Doug <zerted>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #30588:  cmd-line-speed-fix.patch added by zerted (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by feb (Posted a comment)
  • -email is unavailable- added by zerted (Submitted the item)
  • -email is unavailable- added by zerted
  •  

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-22 feb Open/ClosedOpen Closed
        StatusNone Done
    2014-02-21 feb Assigned toNone feb
    2014-02-17 zerted Attached File- Added cmd-line-speed-fix.patch, #30588
        Carbon-Copy- Added zerted

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code