ACE3/addons/common/functions/fnc_goKneeling.sqf

24 lines
663 B
Plaintext
Raw Normal View History

/*
* Author: commy2
* Move unit to kneeling position (only if not yet prone).
*
2015-09-20 14:40:49 +00:00
* Arguments:
* 0: Unit <OBJECT>
*
2015-09-20 14:40:49 +00:00
* Return Value:
* None
*
2015-09-20 14:40:49 +00:00
* Public: No
*/
2015-01-13 19:56:02 +00:00
#include "script_component.hpp"
2015-09-20 14:40:49 +00:00
params ["_unit"];
// Animation changes even inside vehicle post-1.60
if (stance _unit == "PRONE" || {vehicle ACE_player != ACE_player}) exitWith {};
2015-05-14 22:12:40 +00:00
2015-09-20 14:40:49 +00:00
[
_unit,
["AmovPknlMstpSnonWnonDnon", "AmovPknlMstpSlowWrflDnon", "AmovPknlMstpSrasWlnrDnon", "AmovPknlMstpSlowWpstDnon", "AmovPknlMstpSoptWbinDnon"] select ((["", primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit, binocular _unit] find currentWeapon _unit) max 0)
] call FUNC(doAnimation);