ACE3/addons/refuel/functions/fnc_handleUnconscious.sqf
IngoKauffmann cdd0c4c013 Next few things
Clean up
Removed MP issues
Added macros for reused code
Added death handling
Added unconscious handling
Added fueling restart
2015-08-18 23:18:32 +02:00

30 lines
582 B
Plaintext

/*
* Author: GitHawk, Jonpas
* Handles medical on unconscious event.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Is Unconscious <BOOL>
*
* Return Value:
* None
*
* Example:
* [unit, true] call ace_refuel_fnc_handleUnconscious
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_isUnconscious"];
if (!local _unit || {!_isUnconscious}) exitWith {};
private "_nozzle";
[_unit, QGVAR(vehAttach), false] call EFUNC(common,setForceWalkStatus);
_nozzle = _unit setVariable [QGVAR(nozzle), objNull];
if !(isNull _nozzle) then {
REFUEL_UNIT_DROP_NOZZLE
};