Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Core/GameEngine/Source/GameNetwork/DisconnectManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@ void DisconnectManager::processDisconnectPlayer(NetCommandMsg *msg, ConnectionMa
NetDisconnectPlayerCommandMsg *cmdMsg = (NetDisconnectPlayerCommandMsg *)msg;
DEBUG_LOG(("DisconnectManager::processDisconnectPlayer - Got disconnect player command from player %d. Disconnecting player %d on frame %d", msg->getPlayerID(), cmdMsg->getDisconnectSlot(), cmdMsg->getDisconnectFrame()));
DEBUG_ASSERTCRASH(TheGameLogic->getFrame() == cmdMsg->getDisconnectFrame(), ("disconnecting player on the wrong frame!!!"));
Int slot = cmdMsg->getDisconnectSlot();

// if this is a self initiated quit (Quit button on DC menu),
// send a destroy-player command so assets are removed.
if (cmdMsg->getPlayerID() == slot) {
// sendPlayerDestruct assumes we are (or we will become) the router.
sendPlayerDestruct(slot, conMgr);
}
disconnectPlayer(cmdMsg->getDisconnectSlot(), conMgr);
}

Expand Down
Loading