ACE3/addons/refuel/functions/fnc_handleUnconscious.sqf

28 lines
635 B
Plaintext
Raw Normal View History

/*
* Author: GitHawk, Jonpas
* Handles medical on unconscious event.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Is Unconscious <BOOL>
*
* Return Value:
* None
*
* Example:
2015-08-21 20:43:45 +00:00
* [player, true] call ace_refuel_fnc_handleUnconscious
*
* Public: No
*/
#include "script_component.hpp"
params [["_unit", objNull, [objNull]], ["_isUnconscious", false, [false]]];
if (!local _unit || {!_isUnconscious}) exitWith {};
2016-01-19 15:34:59 +00:00
[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set);
private _nozzle = _unit getVariable [QGVAR(nozzle), objNull];
if !(isNull _nozzle) then {
[_unit, _nozzle] call FUNC(dropNozzle);
};