File throwing a couple of errors on player death

This commit is contained in:
Matthew McConnell
2013-08-21 23:44:56 +01:00
parent 3da1d8b6a4
commit 376e443e78

View File

@@ -7,9 +7,8 @@ _playerID = _this select 3;
_playerName = _this select 4;
_infected = _this select 5;
_victim = _newObject;
_victim removeAllEventHandlers "MPHit";
_victim = _this select 2;
_victimName = _victim getVariable["bodyName", "nil"];
_killer = _victim getVariable["AttackedBy", "nil"];
@@ -57,6 +56,10 @@ if (_killerName != "nil") then
_victim setVariable["AttackedFromDistance", "nil", true];
};
// Might not be the best way...
if (isnil "dayz_disco") then {
dayz_disco = [];
};
dayz_disco = dayz_disco - [_playerID];
_newObject setVariable["processedDeath",time];
@@ -80,4 +83,4 @@ else
#ifdef DZE_SERVER_DEBUG_PKILL
diag_log ("PDEATH: Player Died " + _playerID);
#endif
#endif