Fix an OOS on rejoin after doubleclicking on the StartGame button, fixes #5199, refs #5162.

Prevents changes to the gamesettings after the game was started, so as
to use the correct map seed when generating the random map terrain for
rejoiners.
D1558 will prevent the UI bug #5206 and FSM error from doubleclicking on
StartGame.

Differential Revision: https://code.wildfiregames.com/D1562
Tested and accepted by: temple
This was SVN commit r21836.
This commit is contained in:
elexis
2018-06-05 12:24:30 +00:00
parent 48e794e97d
commit ee9cf54149
+5
View File
@@ -1217,6 +1217,11 @@ bool CNetServerWorker::OnGameSetup(void* context, CFsmEvent* event)
CNetServerSession* session = (CNetServerSession*)context;
CNetServerWorker& server = session->GetServer();
// Changing the settings after gamestart is not implemented and would cause an Out-of-sync error.
// This happened when doubleclicking on the startgame button.
if (server.m_State != SERVER_STATE_PREGAME)
return true;
if (session->GetGUID() == server.m_HostGUID)
{
CGameSetupMessage* message = (CGameSetupMessage*)event->GetParamRef();