Don't throw NetServer FSM errors if a client presses not-ready just before the host launches the game.
Differential Revision: https://code.wildfiregames.com/D290 Reviewed By: Imarok Refs #3199 This was SVN commit r19404.
This commit is contained in:
parent
ee987d3b0d
commit
65cbf12b7e
@ -1103,6 +1103,11 @@ bool CNetServerWorker::OnReady(void* context, CFsmEvent* event)
|
||||
CNetServerSession* session = (CNetServerSession*)context;
|
||||
CNetServerWorker& server = session->GetServer();
|
||||
|
||||
// Occurs if a client presses not-ready
|
||||
// in the very last moment before the hosts starts the game
|
||||
if (server.m_State == SERVER_STATE_LOADING)
|
||||
return true;
|
||||
|
||||
CReadyMessage* message = (CReadyMessage*)event->GetParamRef();
|
||||
message->m_GUID = session->GetGUID();
|
||||
server.Broadcast(message, { NSS_PREGAME });
|
||||
|
Loading…
Reference in New Issue
Block a user