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
|
|
@ -22,7 +22,10 @@ define(["Chuck/ServerGame"], function(ServerGame) {
|
|||
this.serverGame.createPlayerForUser(user)
|
||||
}
|
||||
|
||||
Channel.prototype.releaseUser = function(user){
|
||||
Channel.prototype.releaseUser = function(user) {
|
||||
this.serverGame.userIdLeft(user.id);
|
||||
|
||||
this.sendCommandToAllUsersExcept("userLeft", user.id, user);
|
||||
delete this.users[user.id];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue