Change _scaled_tick_counter to uint64

This commit is contained in:
Jonathan G Rennison
2022-12-11 00:04:12 +00:00
parent ce9ccdb72a
commit f4d775cad3
3 changed files with 4 additions and 4 deletions

View File

@@ -31,7 +31,7 @@ Date _date; ///< Current date in days (day counter)
DateFract _date_fract; ///< Fractional part of the day.
uint64 _tick_counter; ///< Ever incrementing tick counter for setting off various events
uint8 _tick_skip_counter; ///< Counter for ticks, when only vehicles are moving and nothing else happens
uint32 _scaled_tick_counter; ///< Tick counter in daylength-scaled ticks
uint64 _scaled_tick_counter; ///< Tick counter in daylength-scaled ticks
DateTicksScaled _scaled_date_ticks; ///< Date as ticks in daylength-scaled ticks
uint32 _quit_after_days; ///< Quit after this many days of run time
@@ -63,7 +63,7 @@ void SetDate(Date date, DateFract fract)
void SetScaledTickVariables()
{
_scaled_date_ticks = ((((DateTicksScaled)_date * DAY_TICKS) + _date_fract) * _settings_game.economy.day_length_factor) + _tick_skip_counter;
_scaled_tick_counter = (uint32)((_tick_counter * _settings_game.economy.day_length_factor) + _tick_skip_counter);
_scaled_tick_counter = (uint64)((_tick_counter * _settings_game.economy.day_length_factor) + _tick_skip_counter);
}
#define M(a, b) ((a << 5) | b)