implemented clientReady and changed loading of assets, fixed unique ragdoll id

This commit is contained in:
Jeena 2014-02-24 17:41:01 +01:00
parent f578b92734
commit 695008afd8
278 changed files with 306 additions and 287 deletions

View file

@ -80,12 +80,15 @@ function (Parent, NotificationCenter) {
};
Player.prototype.kill = function(killedByPlayer) {
Parent.prototype.kill.call(this, killedByPlayer);
this.stats.deaths++;
var ragDollId = this.stats.deaths;
Parent.prototype.kill.call(this, killedByPlayer, ragDollId);
this.broadcastStats();
NotificationCenter.trigger("broadcastGameCommand", "playerKill", {
playerId: this.id,
killedByPlayerId: killedByPlayer.id
killedByPlayerId: killedByPlayer.id,
ragDollId: ragDollId
});
if(this.ragDoll) {