Don't add fake weapon in restoreGear (#5491)

Fix #5474
This commit is contained in:
PabstMirror 2017-09-10 14:42:04 -05:00 committed by GitHub
parent c7b804a685
commit 3869c8362f

View File

@ -17,9 +17,16 @@
#include "script_component.hpp" #include "script_component.hpp"
params ["_unit", "_allGear", "_activeWeaponAndMuzzle"]; params ["_unit", "_allGear", "_activeWeaponAndMuzzle"];
TRACE_3("restoreGear",_unit, count _allGear, _activeWeaponAndMuzzle);
// restore all gear // restore all gear
if (!isNil "_allGear") then { if (!isNil "_allGear") then {
_allGear params ["_primaryWeaponArray"];
if ((_primaryWeaponArray param [0, ""]) == "ACE_FakePrimaryWeapon") then {
TRACE_1("Ignoring fake gun",_primaryWeaponArray);
_allGear set [0, []];
_activeWeaponAndMuzzle = nil;
};
_unit setUnitLoadout _allGear; _unit setUnitLoadout _allGear;
}; };