Add setting for milliseconds per game tick mode
This commit is contained in:
@@ -46,6 +46,8 @@ bool _shift_pressed; ///< Is Shift pressed?
|
||||
bool _invert_ctrl;
|
||||
bool _invert_shift;
|
||||
uint16 _game_speed = 100; ///< Current game-speed; 100 is 1x, 0 is infinite.
|
||||
uint8 _milliseconds_per_tick = 27; ///< Milliseconds per tick
|
||||
float _ticks_per_second; ///< Ticks per second
|
||||
bool _left_button_down; ///< Is left mouse button pressed?
|
||||
bool _left_button_clicked; ///< Is left mouse button clicked?
|
||||
bool _right_button_down; ///< Is right mouse button pressed?
|
||||
@@ -2439,3 +2441,9 @@ void ChangeGameSpeed(bool enable_fast_forward)
|
||||
_game_speed = 100;
|
||||
}
|
||||
}
|
||||
|
||||
void SetupTickRate()
|
||||
{
|
||||
_milliseconds_per_tick = (_settings_game.economy.tick_rate == TRM_MODERN) ? 27 : 30;
|
||||
_ticks_per_second = 1000.0f / _milliseconds_per_tick;
|
||||
}
|
||||
|
Reference in New Issue
Block a user