1
0
mirror of https://github.com/acemod/ACE3.git synced 2024-08-30 18:23:18 +00:00

MedicalAI - Fix treatment animion with no weapon ()

This commit is contained in:
PabstMirror 2016-11-03 18:01:58 -05:00 committed by Glowbal
parent 21baf7fc1f
commit 0746264905

@ -32,7 +32,12 @@ if (stance _unit == "PRONE") then {
};
private _anim = getText (_animConfig >> _configProperty);
private _wpn = ["non", "rfl", "pst"] select (1 + ([primaryWeapon _unit, handgunWeapon _unit] find (currentWeapon _unit)));
private _wpn = switch (true) do {
case ((currentWeapon _unit) == ""): {"non"};
case ((currentWeapon _unit) == (primaryWeapon _unit)): {"rfl"};
case ((currentWeapon _unit) == (handgunWeapon _unit)): {"pst"};
default {"non"};
};
_anim = [_anim, "[wpn]", _wpn] call CBA_fnc_replace;
[_unit, _anim] call EFUNC(common,doAnimation);