changed this to self because of #65 hope this helps

This commit is contained in:
Jeena 2014-06-29 00:14:56 +02:00
parent e74c7b8219
commit 2343049227

View file

@ -101,11 +101,11 @@
if(!this.gameController.level || !this.gameController.level.isLoaded) { if(!this.gameController.level || !this.gameController.level.isLoaded) {
var token = Nc.on(Nc.ns.core.game.events.level.loaded, function() { var token = Nc.on(Nc.ns.core.game.events.level.loaded, function() {
self.sendJoinSuccess(options); self.sendJoinSuccess(options);
this.users[options.id].sendControlCommand("beginRound", clientGameControllerOptions); self.users[options.id].sendControlCommand("beginRound", clientGameControllerOptions);
Nc.off(token); Nc.off(token);
}); });
} else { } else {
self.sendJoinSuccess(options); this.sendJoinSuccess(options);
this.users[options.id].sendControlCommand("beginRound", clientGameControllerOptions); this.users[options.id].sendControlCommand("beginRound", clientGameControllerOptions);
} }
} }