Store state ticks directly in savegame instead of the offset
Initialise the state ticks value to a constant for new games, instead of using an implicit offset of 0
This commit is contained in:
@@ -11605,7 +11605,8 @@ void LoadNewGRF(uint load_index, uint num_baseset)
|
||||
uint64_t tick_counter = _tick_counter;
|
||||
uint8_t tick_skip_counter = _tick_skip_counter;
|
||||
uint64_t scaled_tick_counter = _scaled_tick_counter;
|
||||
StateTicks state_ticks_offset = _state_ticks_offset;
|
||||
StateTicks state_ticks = _state_ticks;
|
||||
StateTicksDelta state_ticks_offset = _state_ticks_offset;
|
||||
byte display_opt = _display_opt;
|
||||
|
||||
if (_networking) {
|
||||
@@ -11615,10 +11616,10 @@ void LoadNewGRF(uint load_index, uint num_baseset)
|
||||
_tick_counter = 0;
|
||||
_tick_skip_counter = 0;
|
||||
_scaled_tick_counter = 0;
|
||||
_state_ticks_offset = 0;
|
||||
_state_ticks = 0;
|
||||
_display_opt = 0;
|
||||
UpdateCachedSnowLine();
|
||||
SetScaledTickVariables();
|
||||
RecalculateStateTicksOffset();
|
||||
}
|
||||
|
||||
InitializeGRFSpecial();
|
||||
@@ -11722,10 +11723,10 @@ void LoadNewGRF(uint load_index, uint num_baseset)
|
||||
_tick_counter = tick_counter;
|
||||
_tick_skip_counter = tick_skip_counter;
|
||||
_scaled_tick_counter = scaled_tick_counter;
|
||||
_state_ticks = state_ticks;
|
||||
_state_ticks_offset = state_ticks_offset;
|
||||
_display_opt = display_opt;
|
||||
UpdateCachedSnowLine();
|
||||
SetScaledTickVariables();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user