fixed a small bug regarding suicide and killedByItem

This commit is contained in:
logsol 2015-03-02 19:55:24 +01:00
parent 5eeb120799
commit 6149b6c47b

View file

@ -55,7 +55,7 @@ function (Parent, Nc) {
};
Player.prototype.suicide = function() {
this.addDamage(100, this);
this.addDamage(100, this, null);
};
Player.prototype.addDamage = function(damage, enemy, byItem) {
@ -87,7 +87,7 @@ function (Parent, Nc) {
playerId: this.id,
killedByPlayerId: killedByPlayer.id,
ragDollId: ragDollId,
item: byItem.options.name
item: byItem ? byItem.options.name : "Suicide"
});