More fixes. Using player name as base for game name now. Removing games which have no players left. Check collision of all player names on connect (kind of slow, but name needs to be unique).
This commit is contained in:
1 parent
3e4b134faa
commit
3a2f3255af
10 files changed
+120
-15
No files matched your search
@@ -655,9 +655,13 @@ ServerGameStateStartRound::Process(ServerGameThread &server)
|
||||
if (curGame.getCurrentHand()->getPlayerArray()[i]->getMyCash() > 0)
|
||||
playersPositiveCashCounter++;
|
||||
}
|
||||
// TODO: this is not an assert - terminate game if true.
|
||||
assert(playersPositiveCashCounter);
|
||||
if (playersPositiveCashCounter == 1)
|
||||
if (!playersPositiveCashCounter)
|
||||
{
|
||||
// No more players left - restart.
|
||||
server.SetState(SERVER_INITIAL_STATE::Instance());
|
||||
retVal = MSG_NET_GAME_SERVER_END;
|
||||
}
|
||||
else if (playersPositiveCashCounter == 1)
|
||||
{
|
||||
// View a dialog for a new game - delayed.
|
||||
server.SetState(ServerGameStateNextGameDelay::Instance());
|
||||
|
||||
Reference in new issue
Block a user