Anti-Dupe on Revive

Prevent simultaneous reviving
This commit is contained in:
He-Man 2017-03-01 19:09:26 +01:00 committed by GitHub
parent 89a1a6b4f9
commit 53c02fe16a

View File

@ -51,6 +51,10 @@ if (!local _player) then {
if (_class in ["Epoch_Male_F", "Epoch_Female_F"]) then {
if (_player getVariable["REVIVE", true]) then {
if (_player getvariable ['Reviving', false]) exitwith {
diag_log format['DEBUG Reviving skipped - Player already reviving : %1', _this];
};
_player setvariable ['Reviving',true];
diag_log format["DEBUG server_revivePlayer : %1", _this];
@ -71,21 +75,7 @@ if (!local _player) then {
_secondaryWeapon = "";
_wh = nearestObjects[_player, ["WeaponHolderSimulated"], 12];
/*
_droppedWeapons = [];
reverse _wh;
{
{
_droppedWeapons pushBack _x;
_type = getNumber(configfile >> "cfgweapons" >> (_x select 0) >> "type");
switch _type do {
case 1: { _primaryWeapon = _x select 0 };
case 4: { _secondaryWeapon = _x select 0 };
};
} forEach (weaponsItemsCargo _x);
} foreach _wh;
*/
_droppedPrimary = [];
_droppedSecondary = [];
_droppedWeapons = [];