If everyone leaves, but the game was in play, put the game into game
over state, not cancelled. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4069 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -599,8 +599,15 @@ public class GameManager extends PlaceManager
|
|||||||
// Log.info("Game room empty. Going away. " +
|
// Log.info("Game room empty. Going away. " +
|
||||||
// "[game=" + _gameobj.which() + "].");
|
// "[game=" + _gameobj.which() + "].");
|
||||||
|
|
||||||
|
// If we're in play then move to game over
|
||||||
|
if (_gameobj.state != GameObject.PRE_GAME &&
|
||||||
|
_gameobj.state != GameObject.GAME_OVER &&
|
||||||
|
_gameobj.state != GameObject.CANCELLED) {
|
||||||
|
_gameobj.setState(GameObject.GAME_OVER);
|
||||||
|
shutdown();
|
||||||
|
|
||||||
// cancel the game; which will shut us down
|
// cancel the game; which will shut us down
|
||||||
if (!cancelGame()) {
|
} else if (!cancelGame()) {
|
||||||
// or shut down directly if the game is already over
|
// or shut down directly if the game is already over
|
||||||
shutdown();
|
shutdown();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user