Kicking players at the beginning of a network game now works.

This commit is contained in:
lotodore
2007-06-07 21:19:06 +00:00
parent f886ebda86
commit fb274284f5
14 changed files with 122 additions and 45 deletions
+9 -9
View File
@@ -379,7 +379,15 @@ AbstractClientStateReceiving::Process(ClientThread &client)
if (tmpPacket.get())
{
if (tmpPacket->ToNetPacketChatText())
if (tmpPacket->ToNetPacketError())
{
// Server reported an error.
NetPacketError::Data errorData;
tmpPacket->ToNetPacketError()->GetData(errorData);
// Show the error.
throw ClientException(errorData.errorCode, 0);
}
else if (tmpPacket->ToNetPacketChatText())
{
// Chat message - display it in the GUI.
NetPacketChatText::Data chatData;
@@ -464,14 +472,6 @@ ClientStateWaitSession::InternalProcess(ClientThread &client, boost::shared_ptr<
client.SetState(ClientStateWaitGame::Instance());
retVal = MSG_SOCK_SESSION_DONE;
}
else if (packet->ToNetPacketError())
{
// Server reported an error.
NetPacketError::Data errorData;
packet->ToNetPacketError()->GetData(errorData);
// Show the error.
throw ClientException(errorData.errorCode, 0);
}
return retVal;
}