ACE3/addons/refuel/functions/fnc_disconnect.sqf

30 lines
614 B
Plaintext
Raw Normal View History

2015-08-13 17:33:55 +00:00
/*
* Author: GitHawk
* Disconnect a fuel nozzle
*
* Arguments:
* 0: The unit <OBJECT>
* 1: The object holding the nozzle <OBJECT>
*
* Return Value:
2015-08-14 01:18:54 +00:00
* None
2015-08-13 17:33:55 +00:00
*
* Example:
* [unit, truck] call ace_refuel_fnc_disconnect
*
2015-08-14 01:18:54 +00:00
* Public: No
2015-08-13 17:33:55 +00:00
*/
#include "script_component.hpp"
private ["_nozzle"];
2015-08-13 17:33:55 +00:00
params ["_unit", "_nozzleHolder"];
_nozzle = _nozzleHolder getVariable QGVAR(nozzle);
detach _nozzle;
_nozzle setVariable [QGVAR(sink), objNull, true];
2015-08-13 17:33:55 +00:00
_nozzleHolder setVariable [QGVAR(nozzle), objNull, true];
_unit setVariable [QGVAR(nozzle), _nozzle];
[_unit, _nozzleHolder, _nozzle] call FUNC(takeNozzle);