drop disconnected spectators from games instead of keeping them alive

This commit is contained in:
Max-Wilhelm Bruker 2011-03-03 01:25:11 +01:00
parent 57f9e2c3b4
commit 657f97680a

View file

@ -35,7 +35,7 @@ Server_ProtocolHandler::~Server_ProtocolHandler()
Server_Game *g = gameIterator.value().first; Server_Game *g = gameIterator.value().first;
Server_Player *p = gameIterator.value().second; Server_Player *p = gameIterator.value().second;
if (authState == UnknownUser) if ((authState == UnknownUser) || p->getSpectator())
g->removePlayer(p); g->removePlayer(p);
else else
p->setProtocolHandler(0); p->setProtocolHandler(0);