Commit 57aa30ff authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files
parents 91a74abc 6df69f60
......@@ -12,6 +12,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, CardZone *_origZone, int numberC
: QGraphicsWidget(0, Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowSystemMenuHint | Qt::WindowTitleHint/* | Qt::WindowCloseButtonHint*/), player(_player)
{
setAttribute(Qt::WA_DeleteOnClose);
setZValue(100);
QFont font;
font.setPixelSize(10);
......
......@@ -198,11 +198,12 @@ void Server_Game::removePlayer(Server_Player *player)
{
players.remove(player->getPlayerId());
sendGameEvent(new Event_Leave(player->getPlayerId()));
bool spectator = player->getSpectator();
delete player;
if (!getPlayerCount())
deleteLater();
else
else if (!spectator)
stopGameIfFinished();
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