Fix potential kills doubling after change clothes

Fix by @seelenapparat
This commit is contained in:
AirwavesMan
2020-09-13 15:18:17 +02:00
parent e93783d190
commit 0b26ae1246
2 changed files with 9 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ if (Z_SingleCurrency) then {
};
//Switch
[_model, _charID, _humanity] call player_switchModel; //Already spawned thread, no need to spawn and waitUntil script is done
[_model, _charID, _humanity, _zombieKills, _headShots, _humanKills, _banditKills] call player_switchModel; //Already spawned thread, no need to spawn and waitUntil script is done
//Login
@@ -81,10 +81,10 @@ if (count _medical > 0) then {
//General Stats
//player setVariable ["humanity",_humanity,true]; //Moved to player_switchModel
player setVariable ["zombieKills",_zombieKills,true];
player setVariable ["headShots",_headShots,true];
player setVariable ["humanKills",_humanKills,true];
player setVariable ["banditKills",_banditKills,true];
//player setVariable ["zombieKills",_zombieKills,true]; //Moved to player_switchModel
//player setVariable ["headShots",_headShots,true]; //Moved to player_switchModel
//player setVariable ["humanKills",_humanKills,true]; //Moved to player_switchModel
//player setVariable ["banditKills",_banditKills,true]; //Moved to player_switchModel
//player setVariable ["characterID",_charID,true]; //Moved to player_switchModel
player setVariable ["worldspace",_worldspace];
player setVariable ["combattimeout",_combattimeout,false];

View File

@@ -75,6 +75,10 @@ if (_isArray) then {
mydamage_eh1 = _newUnit AddEventHandler ["HandleDamage", {False}];
_newUnit setVariable ["characterID",(_this select 1),true];
_newUnit setVariable ["humanity",(_this select 2),true];
_newUnit setVariable ["zombieKills",(_this select 3),true];
_newUnit setVariable ["headShots",(_this select 4),true];
_newUnit setVariable ["humanKills",(_this select 5),true];
_newUnit setVariable ["banditKills",(_this select 6),true];
};
_newUnit setDir _dir;
{_newUnit removeMagazine _x;} count magazines _newUnit;