ACE3/addons/sandbag/functions/fnc_deployCancel.sqf

36 lines
856 B
Plaintext
Raw Normal View History

2015-06-02 17:30:50 +00:00
/*
* Author: Garth 'L-H' de Wet, Ruthberg
* Cancels sandbag deployment
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
2015-06-02 18:07:35 +00:00
* call ace_sandbag_fnc_deployCancel;
2015-06-02 17:30:50 +00:00
*
* Public: No
*/
#include "script_component.hpp"
if (isNull GVAR(placer)) exitWith {};
[GVAR(deployPFH)] call cba_fnc_removePerFrameHandler;
if (!isNull (GVAR(sandBag))) then {
deleteVehicle GVAR(sandBag);
};
2015-06-02 18:01:00 +00:00
[GVAR(placer), "ACE_Sandbag", false] call EFUNC(Common,setForceWalkStatus);
2015-06-02 17:30:50 +00:00
call EFUNC(interaction,hideMouseHint);
[GVAR(placer), "DefaultAction", GVAR(placer) getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
[GVAR(placer), "zoomtemp", GVAR(placer) getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
2015-06-02 18:01:48 +00:00
GVAR(placer) addItem "ACE_Sandbag_empty";
2015-06-02 18:01:48 +00:00
GVAR(sandBag) = objNull;
GVAR(placer) = objNull;