Annouce a player's game over *in* playerGameDidEnd() rather than after because

a natural thing to do in playerGameDidEnd() is replacePlayer() the departed
player with an AI but if we wait until after playerGameDidEnd() to announce it,
we end up announcing the departure of the newly configured AI.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@161 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2007-01-29 18:07:33 +00:00
parent a8108fdaa0
commit f139e30daa
@@ -495,8 +495,6 @@ public class GameManager extends PlaceManager
// let derived classes do some business
playerGameDidEnd(pidx);
announcePlayerGameOver(pidx);
} finally {
_gameobj.commitTransaction();
}
@@ -1103,6 +1101,8 @@ public class GameManager extends PlaceManager
*/
protected void playerGameDidEnd (int pidx)
{
// report that the player's game is over to anyone still in the game room
announcePlayerGameOver(pidx);
}
/**