mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Add LeaveGame netpack and avoid replying on it and CloseServer
This commit is contained in:
@@ -83,7 +83,7 @@ struct EvilHlpStruct
|
||||
|
||||
void reset()
|
||||
{
|
||||
vstd::clear_pointer(serv);
|
||||
// vstd::clear_pointer(serv);
|
||||
vstd::clear_pointer(sInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -701,6 +701,12 @@ void CClient::stopConnection()
|
||||
sendRequest(&close_server, PlayerColor::NEUTRAL);
|
||||
logNetwork->infoStream() << "Sent closing signal to the server";
|
||||
}
|
||||
else
|
||||
{
|
||||
LeaveGame leave_Game;
|
||||
sendRequest(&leave_Game, PlayerColor::NEUTRAL);
|
||||
logNetwork->infoStream() << "Sent leaving signal to the server";
|
||||
}
|
||||
|
||||
if(connectionHandler)//end connection handler
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user