Commit 6df69f60 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

minor servatrice fix

parent e3021d2c
...@@ -198,11 +198,12 @@ void Server_Game::removePlayer(Server_Player *player) ...@@ -198,11 +198,12 @@ void Server_Game::removePlayer(Server_Player *player)
{ {
players.remove(player->getPlayerId()); players.remove(player->getPlayerId());
sendGameEvent(new Event_Leave(player->getPlayerId())); sendGameEvent(new Event_Leave(player->getPlayerId()));
bool spectator = player->getSpectator();
delete player; delete player;
if (!getPlayerCount()) if (!getPlayerCount())
deleteLater(); deleteLater();
else else if (!spectator)
stopGameIfFinished(); stopGameIfFinished();
qobject_cast<Server *>(parent())->broadcastGameListUpdate(this); qobject_cast<Server *>(parent())->broadcastGameListUpdate(this);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment