2015-06-02 17:30:50 +00:00
|
|
|
/*
|
2015-09-26 01:16:55 +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:
|
2015-09-26 01:16:55 +00:00
|
|
|
* 0: unit <OBJECT>
|
2015-06-02 17:30:50 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2015-09-26 01:16:55 +00:00
|
|
|
* [ACE_player] call ace_sandbag_fnc_deployCancel
|
2015-06-02 17:30:50 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
params ["_unit"];
|
2015-06-02 17:30:50 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
// enable running again
|
|
|
|
[_unit, "ACE_Sandbag", false] call EFUNC(common,setForceWalkStatus);
|
2015-06-02 17:30:50 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
// delete placement dummy
|
|
|
|
deleteVehicle GVAR(sandBag);
|
2015-06-02 17:30:50 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
// remove deployment pfh
|
|
|
|
[GVAR(deployPFH)] call CBA_fnc_removePerFrameHandler;
|
|
|
|
GVAR(deployPFH) = -1;
|
2015-06-02 17:30:50 +00:00
|
|
|
|
2015-09-26 01:16:55 +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
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler);
|
|
|
|
[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler);
|
2015-06-04 09:13:12 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
_unit setVariable [QGVAR(isDeploying), false, true];
|