mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
fixed problem when user disconnected
This commit is contained in:
parent
e751210345
commit
7d0df79ac8
8 changed files with 73 additions and 33 deletions
|
|
@ -70,6 +70,10 @@ define(requires,
|
|||
this.inputControlUnit = new InputControlUnit(this.me, this);
|
||||
}
|
||||
|
||||
ClientProcessor.prototype.userIdLeft = function(userId) {
|
||||
// body...
|
||||
};
|
||||
|
||||
ClientProcessor.prototype.sendGameCommand = function(command, options) {
|
||||
this.clientGame.sendGameCommand(command, options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,11 @@ define(requires, function(PhysicsEngine, Player, Box2D, Level, InputController,
|
|||
}
|
||||
}
|
||||
|
||||
ServerProcessor.prototype.userIdLeft = function(id) {
|
||||
var player = this.players[id].player;
|
||||
player.destroy();
|
||||
}
|
||||
|
||||
ServerProcessor.prototype.updateWorld = function() {
|
||||
|
||||
var update = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue