2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* 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"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
PARAMS_1(_unit);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-05-14 22:12:40 +00:00
|
|
|
//IGNORE_PRIVATE_WARNING("_exception");
|
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
try {
|
2015-05-14 18:06:06 +00:00
|
|
|
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"};
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
|
|
|
} catch {
|
2015-05-14 18:06:06 +00:00
|
|
|
if (stance _unit != "PRONE") then {
|
|
|
|
[_unit, _exception] call FUNC(doAnimation);
|
|
|
|
};
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|