2015-06-12 21:54:51 +00:00
|
|
|
/*
|
|
|
|
* Author: Rocko, Ruthberg
|
|
|
|
* Confirm tactical ladder deployment
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: ladder <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-07 06:19:15 +00:00
|
|
|
* Success <BOOL>
|
2015-06-12 21:54:51 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-08-07 06:19:15 +00:00
|
|
|
* [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy
|
2015-06-12 21:54:51 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
2015-06-03 18:27:52 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-07 06:19:15 +00:00
|
|
|
params ["_ladder"];
|
2015-06-03 18:27:52 +00:00
|
|
|
|
2015-06-12 20:45:41 +00:00
|
|
|
private ["_pos1", "_pos2"];
|
|
|
|
_pos1 = getPosASL GVAR(ladder);
|
|
|
|
_pos2 = (GVAR(ladder) modelToWorld (GVAR(ladder) selectionPosition "check2")) call EFUNC(common,positionToASL);
|
2015-06-12 21:54:51 +00:00
|
|
|
if (lineIntersects [_pos1, _pos2, GVAR(ladder)]) exitWith { false };
|
|
|
|
|
|
|
|
call EFUNC(interaction,hideMouseHint);
|
2015-08-07 06:19:15 +00:00
|
|
|
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler);
|
|
|
|
[ACE_player, "zoomtemp", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
2015-06-03 18:27:52 +00:00
|
|
|
|
|
|
|
detach _ladder;
|
2015-06-12 21:54:51 +00:00
|
|
|
GVAR(ladder) = objNull;
|
2015-06-03 18:27:52 +00:00
|
|
|
|
2015-06-12 21:54:51 +00:00
|
|
|
true
|