ACE3/addons/common/functions/fnc_goKneeling.sqf

33 lines
809 B
Plaintext
Raw Normal View History

/*
* Author: commy2
*
* Abhocken! Unit goes kneeling if not prone already and lowers weapon. Try, throw, catch because I'm bored.
*
* Argument:
* 0: Unit (Object)
*
* Return value:
* None.
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
private "_unit";
_unit = _this select 0;
try {
if (_unit == vehicle _unit) then {
switch (currentWeapon _unit) do {
case "" : {throw "AmovPknlMstpSnonWnonDnon"};
case (primaryWeapon _unit) : {throw "AmovPknlMstpSlowWrflDnon"};
case (secondaryWeapon _unit) : {throw "AmovPknlMstpSrasWlnrDnon"};
case (handgunWeapon _unit) : {throw "AmovPknlMstpSlowWpstDnon"};
case (binocular _unit) : {throw "AmovPknlMstpSoptWbinDnon"};
};
};
} catch {
if (stance _unit != "PRONE") then {
2015-01-11 18:20:14 +00:00
[_unit, _exception] call FUNC(doAnimation);
};
};