forked from mirror/OpenTTD
Codechange: Add a priority field to TimerGameTick::TPeriod
Use this as the primary sort key for TimerGameTick::TPeriod, to avoid container sort order changes on timer period saveload. See: #12509
This commit is contained in:
committed by
rubidium42
parent
57f5d27427
commit
11ec156b64
@@ -3255,7 +3255,7 @@ bool AfterLoadGame()
|
||||
/* We did load the "period" of the timer, but not the fired/elapsed. We can deduce that here. */
|
||||
extern TimeoutTimer<TimerGameTick> _new_competitor_timeout;
|
||||
_new_competitor_timeout.storage.elapsed = 0;
|
||||
_new_competitor_timeout.fired = _new_competitor_timeout.period == 0;
|
||||
_new_competitor_timeout.fired = _new_competitor_timeout.period.value == 0;
|
||||
}
|
||||
|
||||
if (IsSavegameVersionBefore(SLV_NEWGRF_LAST_SERVICE)) {
|
||||
|
Reference in New Issue
Block a user