2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2016-02-19 16:24:32 +00:00
|
|
|
/*
|
|
|
|
* Author: GitHawk
|
2017-09-10 19:43:03 +00:00
|
|
|
* Cleans up refuel on client disconnect.
|
2016-02-19 16:24:32 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Player <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [player] call ace_refuel_fnc_handleDisconnect
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2017-09-10 19:43:03 +00:00
|
|
|
params [["_unit", objNull, [objNull]]];
|
|
|
|
TRACE_1("disconnect",_unit);
|
2016-02-19 16:24:32 +00:00
|
|
|
|
2017-09-10 19:43:03 +00:00
|
|
|
if (isNull _unit) exitWith {};
|
2016-02-19 16:24:32 +00:00
|
|
|
|
2017-09-10 19:43:03 +00:00
|
|
|
private _nozzle = _unit getVariable [QGVAR(nozzle), objNull];
|
2016-02-19 16:24:32 +00:00
|
|
|
if (isNull _nozzle) exitWith {};
|
|
|
|
|
2017-09-10 19:43:03 +00:00
|
|
|
[_unit, _nozzle] call FUNC(dropNozzle);
|
2024-08-12 13:15:09 +00:00
|
|
|
[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set);
|