mirror of https://github.com/OpenTTD/OpenTTD
(svn r18141) -Fix (r18051): one couldn't (easily) continue a game in single player that was 'not enough players'/'waiting on join'-paused
parent
adadabed04
commit
36a20894aa
|
@ -57,6 +57,9 @@ enum PauseMode {
|
||||||
PM_PAUSED_JOIN = 1 << 2, ///< A game paused for 'pause_on_join'
|
PM_PAUSED_JOIN = 1 << 2, ///< A game paused for 'pause_on_join'
|
||||||
PM_PAUSED_ERROR = 1 << 3, ///< A game paused because a (critical) error
|
PM_PAUSED_ERROR = 1 << 3, ///< A game paused because a (critical) error
|
||||||
PM_PAUSED_ACTIVE_CLIENTS = 1 << 4, ///< A game paused for 'min_active_clients'
|
PM_PAUSED_ACTIVE_CLIENTS = 1 << 4, ///< A game paused for 'min_active_clients'
|
||||||
|
|
||||||
|
/* Pause mode bits when paused for network reasons */
|
||||||
|
PMB_PAUSED_NETWORK = PM_PAUSED_ACTIVE_CLIENTS | PM_PAUSED_JOIN,
|
||||||
};
|
};
|
||||||
DECLARE_ENUM_AS_BIT_SET(PauseMode);
|
DECLARE_ENUM_AS_BIT_SET(PauseMode);
|
||||||
typedef SimpleTinyEnumT<PauseMode, byte> PauseModeByte;
|
typedef SimpleTinyEnumT<PauseMode, byte> PauseModeByte;
|
||||||
|
|
|
@ -411,6 +411,15 @@ bool AfterLoadGame()
|
||||||
/* Restore the signals */
|
/* Restore the signals */
|
||||||
ResetSignalHandlers();
|
ResetSignalHandlers();
|
||||||
return false;
|
return false;
|
||||||
|
} else if (!_networking || _network_server) {
|
||||||
|
/* If we are in single player, i.e. not networking, and loading the
|
||||||
|
* savegame or we are loading the savegame as network server we do
|
||||||
|
* not want to be bothered by being paused because of the automatic
|
||||||
|
* reason of a network server, e.g. joining clients or too few
|
||||||
|
* active clients. Note that resetting these values for a network
|
||||||
|
* client are very bad because then the client is going to execute
|
||||||
|
* the game loop when the server is not, i.e. it desyncs. */
|
||||||
|
_pause_mode &= ~PMB_PAUSED_NETWORK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* in very old versions, size of train stations was stored differently */
|
/* in very old versions, size of train stations was stored differently */
|
||||||
|
|
Loading…
Reference in New Issue