mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +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
|
|
@ -72,6 +72,10 @@ define(["Protocol/Helper", "Chuck/ClientGame"], function(ProtocolHelper, ClientG
|
|||
this.sendCommand('gameCommand', message);
|
||||
}
|
||||
|
||||
Networker.prototype.onUserLeft = function(userId) {
|
||||
this.clientGame.userLeft(userId);
|
||||
}
|
||||
|
||||
Networker.prototype.processControlCommand = function(command, options) {
|
||||
switch(command) {
|
||||
case 'joinSuccess':
|
||||
|
|
@ -88,6 +92,10 @@ define(["Protocol/Helper", "Chuck/ClientGame"], function(ProtocolHelper, ClientG
|
|||
this.onUserJoined(options);
|
||||
break;
|
||||
|
||||
case 'userLeft':
|
||||
this.onUserLeft(options);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue