fn_hideSlungHelmet.sqf 495 B

123456789101112131415161718
  1. _unit = _this select 0;
  2. _state = _this select 1;
  3. _helmetAttached = _unit getVariable ["GEARF_HelmetAttached", false];
  4. switch (_helmetAttached) do {
  5. case true: {
  6. if (_state) then {
  7. {
  8. if (typeOf _x == "GroundWeaponHolder") then {_x hideObjectGlobal true;};
  9. } forEach (attachedObjects _unit);
  10. } else {
  11. {
  12. if (typeOf _x == "GroundWeaponHolder") then {_x hideObjectGlobal false;};
  13. } forEach (attachedObjects _unit);
  14. };
  15. };
  16. case false: { };
  17. };