fixes #147, fixes #136, is related to but doesnt entirely complete #144

This commit is contained in:
logsol 2016-08-28 22:40:25 +02:00
parent 502cf72a7e
commit c87997c774
13 changed files with 134 additions and 27 deletions

View file

@ -21,6 +21,7 @@ function (Parent, PhysicsEngine, Settings, PlayerController, requestAnimFrame, N
this.animationTimeout = null;
this.worldUpdateTimeout = null;
this.spawnTimeouts = [];
this.roundHasEnded = false;
Parent.call(this, options);
@ -214,6 +215,14 @@ function (Parent, PhysicsEngine, Settings, PlayerController, requestAnimFrame, N
this.spawnPlayer(player, 0);
};
GameController.prototype.endRound = function() {
this.roundHasEnded = true;
for(var id in this.players) {
this.players[id].getPlayerController().setIsInBetweenGames(true);
}
};
// FIXME: remove this method
GameController.prototype.onResetLevel = function(userId) {