mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
e2ac18a05d
* advanced_ballistics * advanced_fatigue * advanced_throwing * ai * aircraft * arsenal * atragmx * attach * backpacks * ballistics * captives * cargo * chemlights * common * concertina_wire * cookoff * dagr * disarming * disposable * dogtags * dragging * explosives * fastroping * fcs * finger * frag * gestures * gforces * goggles * grenades * gunbag * hearing * hitreactions * huntir * interact_menu * interaction * inventory * kestrel4500 * laser * laserpointer * logistics_uavbattery * logistics_wirecutter * magazinerepack * map * map_gestures * maptools * markers * medical * medical_ai * medical_blood * medical_menu * microdagr * minedetector * missileguidance * missionmodules * mk6mortar * modules * movement * nametags * nightvision * nlaw * optics * optionsmenu * overheating * overpressure * parachute * pylons * quickmount * rangecard * rearm * recoil * refuel * reload * reloadlaunchers * repair * respawn * safemode * sandbag * scopes * slideshow * spectator * spottingscope * switchunits * tacticalladder * tagging * trenches * tripod * ui * vector * vehiclelock * vehicles * viewdistance * weaponselect * weather * winddeflection * yardage450 * zeus * arsenal defines.hpp * optionals * DEBUG_MODE_FULL 1 * DEBUG_MODE_FULL 2 * Manual fixes * Add SQF Validator check for #include after block comment * explosives fnc_openTimerUI * fix uniqueItems
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: BaerMitUmlaut
|
|
* Plays the corresponding treatment animation.
|
|
*
|
|
* Arguments:
|
|
* 0: Unit <OBJECT>
|
|
* 1: Is bandage <BOOL>
|
|
* 2: Is self treatment <BOOL>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [bob, true, true] call ACE_medical_ai_fnc_playTreatmentAnim
|
|
*
|
|
* Public: No
|
|
*/
|
|
params ["_unit", "_isBandage", "_isSelfTreatment"];
|
|
|
|
if (vehicle _unit != _unit) exitWith {};
|
|
|
|
private _animConfig = if (_isBandage) then {
|
|
configFile >> "ACE_Medical_Actions" >> "Basic" >> "Bandage";
|
|
} else {
|
|
configFile >> "ACE_Medical_Actions" >> "Basic" >> "Morphine";
|
|
};
|
|
|
|
private _configProperty = "animationCaller";
|
|
if (_isSelfTreatment) then {
|
|
_configProperty = _configProperty + "Self";
|
|
};
|
|
if (stance _unit == "PRONE") then {
|
|
_configProperty = _configProperty + "Prone";
|
|
};
|
|
|
|
private _anim = getText (_animConfig >> _configProperty);
|
|
private _wpn = switch (true) do {
|
|
case ((currentWeapon _unit) == ""): {"non"};
|
|
case ((currentWeapon _unit) == (primaryWeapon _unit)): {"rfl"};
|
|
case ((currentWeapon _unit) == (handgunWeapon _unit)): {"pst"};
|
|
default {"non"};
|
|
};
|
|
_anim = [_anim, "[wpn]", _wpn] call CBA_fnc_replace;
|
|
|
|
[_unit, _anim] call EFUNC(common,doAnimation);
|