(svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother -Fix: new game + pause on new game + autopause make the game not unpause on the first join
This commit is contained in:
@@ -336,6 +336,10 @@ bool AfterLoadGame()
|
||||
|
||||
if (CheckSavegameVersion(98)) GamelogGRFAddList(_grfconfig);
|
||||
|
||||
if (CheckSavegameVersion(119)) {
|
||||
_pause_mode = (_pause_mode == 2) ? PM_PAUSED_NORMAL : PM_UNPAUSED;
|
||||
}
|
||||
|
||||
/* in very old versions, size of train stations was stored differently */
|
||||
if (CheckSavegameVersion(2)) {
|
||||
Station *st;
|
||||
@@ -440,7 +444,7 @@ bool AfterLoadGame()
|
||||
|
||||
switch (gcf_res) {
|
||||
case GLC_COMPATIBLE: _switch_mode_errorstr = STR_NEWGRF_COMPATIBLE_LOAD_WARNING; break;
|
||||
case GLC_NOT_FOUND: _switch_mode_errorstr = STR_NEWGRF_DISABLED_WARNING; _pause_game = -1; break;
|
||||
case GLC_NOT_FOUND: _switch_mode_errorstr = STR_NEWGRF_DISABLED_WARNING; _pause_mode = PM_PAUSED_ERROR; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
@@ -74,7 +74,7 @@ static const SaveLoadGlobVarList _date_desc[] = {
|
||||
SLEG_CONDVAR(_next_competitor_start, SLE_FILE_U16 | SLE_VAR_U32, 0, 108),
|
||||
SLEG_CONDVAR(_next_competitor_start, SLE_UINT32, 109, SL_MAX_VERSION),
|
||||
SLEG_VAR(_trees_tick_ctr, SLE_UINT8),
|
||||
SLEG_CONDVAR(_pause_game, SLE_UINT8, 4, SL_MAX_VERSION),
|
||||
SLEG_CONDVAR(_pause_mode, SLE_UINT8, 4, SL_MAX_VERSION),
|
||||
SLEG_CONDVAR(_cur_town_iter, SLE_UINT32, 11, SL_MAX_VERSION),
|
||||
SLEG_END()
|
||||
};
|
||||
|
@@ -302,7 +302,7 @@ bool LoadOldSaveGame(const char *file)
|
||||
return false;
|
||||
}
|
||||
|
||||
_pause_game = 2;
|
||||
_pause_mode = 2;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "saveload_internal.h"
|
||||
|
||||
extern const uint16 SAVEGAME_VERSION = 118;
|
||||
extern const uint16 SAVEGAME_VERSION = 119;
|
||||
|
||||
SavegameType _savegame_type; ///< type of savegame we are loading
|
||||
|
||||
|
Reference in New Issue
Block a user