ACE3/addons/sandbag/functions/fnc_deployCancel.sqf

37 lines
927 B
Plaintext
Raw Normal View History

2015-06-02 17:30:50 +00:00
/*
* Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support
2015-06-02 17:30:50 +00:00
* Cancels sandbag deployment
*
* Arguments:
* 0: unit <OBJECT>
2015-06-02 17:30:50 +00:00
*
* Return Value:
* None
*
* Example:
* [ACE_player] call ace_sandbag_fnc_deployCancel
2015-06-02 17:30:50 +00:00
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
2015-06-02 17:30:50 +00:00
// enable running again
[_unit, "ACE_Sandbag", false] call EFUNC(common,setForceWalkStatus);
2015-06-02 17:30:50 +00:00
// delete placement dummy
deleteVehicle GVAR(sandBag);
2015-06-02 17:30:50 +00:00
// remove deployment pfh
[GVAR(deployPFH)] call CBA_fnc_removePerFrameHandler;
GVAR(deployPFH) = -1;
2015-06-02 17:30:50 +00:00
// remove mouse button actions
2015-06-02 17:30:50 +00:00
call EFUNC(interaction,hideMouseHint);
2015-06-02 18:01:48 +00:00
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler);
[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler);
_unit setVariable [QGVAR(isDeploying), false, true];