Major redesign: The game can not be left without disconnecting from the server. This happens if a player is kicked, if he wishes to leave, or for other reasons. Error packets from the server will always cause a disconnect, however.
If joining a game fails, there is a proper failure packet now.
This commit is contained in:
@@ -234,6 +234,13 @@ void Session::waitForNetworkServer(unsigned timeoutMsec)
|
||||
}
|
||||
}
|
||||
|
||||
void Session::sendLeaveCurrentGame()
|
||||
{
|
||||
if (!myNetClient)
|
||||
return; // only act if client is running.
|
||||
myNetClient->SendLeaveCurrentGame();
|
||||
}
|
||||
|
||||
void Session::sendStartEvent(bool fillUpWithCpuPlayers)
|
||||
{
|
||||
if (!myNetClient)
|
||||
|
||||
Reference in New Issue
Block a user