Fix double weapon switch for standing treatment

This commit is contained in:
PabstMirror 2015-08-16 14:12:26 -05:00
parent 21f46f4401
commit dd58eef415

View File

@ -181,8 +181,12 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
[_caller, "", 0] call EFUNC(common,doAnimation);
};
if (stance _caller == "STAND") then {
_caller setvariable [QGVAR(treatmentPrevAnimCaller), "amovpknlmstpsraswrfldnon"];
if ((stance _caller) == "STAND") then {
switch (_wpn) do {//If standing, end in a crouched animation based on their current weapon
case ("rfl"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWrflDnon"];};
case ("pst"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSrasWpstDnon"];};
case ("non"): {_caller setvariable [QGVAR(treatmentPrevAnimCaller), "AmovPknlMstpSnonWnonDnon"];};
};
} else {
_caller setvariable [QGVAR(treatmentPrevAnimCaller), animationState _caller];
};