mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #4010 from acemod/rearmHandleNil
rearm - Skip selectWeapon on nil
This commit is contained in:
commit
d7965233d9
@ -20,6 +20,8 @@
|
||||
private ["_dummy", "_actionID"];
|
||||
params [["_unit", objNull, [objNull]], ["_delete", false, [false]], ["_unholster", true, [true]]];
|
||||
|
||||
if (isNull _unit) exitWith {};
|
||||
|
||||
_dummy = _unit getVariable [QGVAR(dummy), objNull];
|
||||
if !(isNull _dummy) then {
|
||||
detach _dummy;
|
||||
|
@ -33,5 +33,8 @@
|
||||
|
||||
#define REARM_UNHOLSTER_WEAPON \
|
||||
_weaponSelect = _unit getVariable QGVAR(selectedWeaponOnRearm); \
|
||||
_unit selectWeapon _weaponSelect; \
|
||||
_unit setVariable [QGVAR(selectedWeaponOnRearm), nil];
|
||||
TRACE_2("REARM_UNHOLSTER_WEAPON",_unit,_weaponSelect); \
|
||||
if (!isNil "_weaponSelect") then { \
|
||||
_unit selectWeapon _weaponSelect; \
|
||||
_unit setVariable [QGVAR(selectedWeaponOnRearm), nil]; \
|
||||
}; \
|
||||
|
Loading…
Reference in New Issue
Block a user