mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
40 lines
925 B
Plaintext
40 lines
925 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: Rocko, Ruthberg, commy2
|
|
* Confirm tactical ladder deployment
|
|
*
|
|
* Arguments:
|
|
* 0: unit <OBJECT>
|
|
* 1: ladder <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Success <BOOL>
|
|
*
|
|
* Example:
|
|
* [_ladder] call ace_tacticalladder_fnc_confirmTLdeploy
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_ladder"];
|
|
|
|
// enable running again
|
|
[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
|
|
[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set);
|
|
|
|
private _pos1 = getPosASL _ladder;
|
|
private _pos2 = _ladder modelToWorldWorld (_ladder selectionPosition "check2");
|
|
|
|
if (lineIntersects [_pos1, _pos2, _ladder]) exitWith {false};
|
|
|
|
detach _ladder;
|
|
|
|
// remove mouse buttons and hint
|
|
call EFUNC(interaction,hideMouseHint);
|
|
|
|
[_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler);
|
|
|
|
GVAR(ladder) = objNull;
|
|
|
|
true
|