mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Saveload: Don't apply state ticks offset on load if not stored in save
This commit is contained in:
parent
58f2e0cdf0
commit
5605650e26
@ -872,7 +872,8 @@ bool AfterLoadGame()
|
||||
if (SlXvIsFeaturePresent(XSLFI_VARIABLE_DAY_LENGTH, 1, 3)) {
|
||||
/* CalTime is used here because EconTime hasn't been set yet, but this needs to be done before setting EconTime::Detail::SetDate,
|
||||
* because that calls RecalculateStateTicksOffset which overwrites DateDetail::_state_ticks_offset which is an input here */
|
||||
_state_ticks = GetStateTicksFromDateWithoutOffset(CalTime::CurDate().base(), CalTime::CurDateFract()) + DateDetail::_state_ticks_offset;
|
||||
_state_ticks = GetStateTicksFromDateWithoutOffset(CalTime::CurDate().base(), CalTime::CurDateFract());
|
||||
if (SlXvIsFeaturePresent(XSLFI_VARIABLE_DAY_LENGTH, 3, 3)) _state_ticks += DateDetail::_state_ticks_offset;
|
||||
}
|
||||
|
||||
/* Update current year
|
||||
|
Loading…
Reference in New Issue
Block a user