ACE3/addons/common/functions/fnc_setProne.sqf
2015-01-17 00:21:47 +01:00

28 lines
657 B
Plaintext

/**
* fn_setProne.sqf
* @Descr: Force a unit to go prone
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return: void
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit"];
_unit = [_this,0, ObjNull,[ObjNull]] call BIS_fnc_Param;
switch (currentWeapon _unit) do {
case (primaryWeapon _unit): {
[_unit,"amovppnemstpsraswrfldnon"] call FUNC(localAnim);
};
case (secondaryWeapon _unit): {
[_unit,"amovppnemstpsraswlnrdnon"] call FUNC(localAnim);
};
case (handgunWeapon _unit): {
[_unit,"AmovPpneMstpSrasWpstDnon"] call FUNC(localAnim);
};
default {
[_unit,"amovppnemstpsnonwnondnon"] call FUNC(localAnim);
};
};