Arsenal - Fix adding inventory item with empty name to dummies (#9279)

* Arsenal - Fix adding inventory item with empty name to dummies

* Update XEH_postInit.sqf
This commit is contained in:
PabstMirror 2023-07-21 22:32:15 -05:00 committed by GitHub
parent 35ce8d1883
commit 9d1b696480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 16 deletions

View File

@ -88,29 +88,29 @@ cba_diagnostic_projectileMaxLines = 10;
{
_unit = _x;
_unit addVest vest _player;
if (vest _player != "") then { _unit addVest vest _player; };
removeBackpack _unit;
_unit addBackpack backpack _player;
_unit addHeadgear headgear _player;
_unit addGoggles goggles _player;
if (backpack _player != "") then { _unit addBackpack backpack _player; };
removeHeadgear _unit;
if (headgear _player != "") then { _unit addHeadgear headgear _player; };
removeGoggles _unit;
if (goggles _player != "") then { _unit addGoggles goggles _player; };
removeAllWeapons _unit;
_unit addWeapon primaryWeapon _player;
if (primaryWeapon _player != "") then { _unit addWeapon primaryWeapon _player; };
{
_unit addPrimaryWeaponItem _x;
} forEach primaryWeaponItems _player;
_unit addWeapon secondaryWeapon _player;
if (secondaryWeapon _player != "") then { _unit addWeapon secondaryWeapon _player; };
{
_unit addSecondaryWeaponItem _x;
} forEach secondaryWeaponItems _player;
_unit addWeapon handgunWeapon _player;
if (handgunWeapon _player != "") then { _unit addWeapon handgunWeapon _player; };
{
_unit addHandgunItem _x;

View File

@ -47,13 +47,13 @@ _target setSpeaker "BASE";
_player reveal [_target, 4];
// Copy player's gear onto target
_target addVest vest _player;
_target addBackpack backpack _player;
_target addHeadgear headgear _player;
_target addGoggles goggles _player;
_target addWeapon primaryWeapon _player;
_target addWeapon secondaryWeapon _player;
_target addWeapon handgunWeapon _player;
if (vest _player != "") then { _target addVest vest _player; };
if (backpack _player != "") then { _target addBackpack backpack _player; };
if (headgear _player != "") then { _target addHeadgear headgear _player; };
if (goggles _player != "") then { _target addGoggles goggles _player; };
if (primaryWeapon _player != "") then { _target addWeapon primaryWeapon _player; };
if (secondaryWeapon _player != "") then { _target addWeapon secondaryWeapon _player; };
if (handgunWeapon _player != "") then { _target addWeapon handgunWeapon _player; };
// Save AI for respawn
_target setVehicleVarName _varName;