mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3079 from jonpas/tacticalLadderFixes
Prevent Tactical Ladder interaction if unit on ladder
This commit is contained in:
@ -40,9 +40,9 @@ if (GETMVAR(ACE_Modifier,0) == 0) then {
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Tilting
|
||||
GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 30;
|
||||
GVAR(ladder) animate ["rotate", GVAR(currentAngle)];
|
||||
// Tilting (disabled due to sinking, interaction point offset and unsuitable animation)
|
||||
//GVAR(currentAngle) = 0 max (GVAR(currentAngle) + _scroll) min 30;
|
||||
//GVAR(ladder) animate ["rotate", GVAR(currentAngle)];
|
||||
};
|
||||
|
||||
true
|
||||
|
31
addons/tacticalladder/functions/fnc_isLadderEmpty.sqf
Normal file
31
addons/tacticalladder/functions/fnc_isLadderEmpty.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: Jonpas
|
||||
* Checks if Tactical Ladder is empty (no one climbing it).
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Ladder <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Can Be Picked Up <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [ladder] call ace_tacticalladder_fnc_isLadderEmpty;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_ladder"];
|
||||
|
||||
private _unitsNearLadder = nearestObjects [_ladder, ["CAManBase"], 4];
|
||||
TRACE_1("Near Ladder",_unitsNearLadder);
|
||||
|
||||
private _ladderEmpty = true;
|
||||
{
|
||||
if (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _x >> "ACE_isLadder") == 1) exitWith {
|
||||
_ladderEmpty = false;
|
||||
TRACE_1("On Ladder",_x);
|
||||
};
|
||||
} forEach _unitsNearLadder;
|
||||
|
||||
_ladderEmpty
|
@ -42,7 +42,8 @@ GVAR(currentStep) = 3;
|
||||
GVAR(currentAngle) = 0;
|
||||
|
||||
// add mouse buttons and hints
|
||||
[localize LSTRING(Deploy), localize LSTRING(Drop), localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint);
|
||||
//private _adjustText = format ["%1, +%2", localize LSTRING(Adjust), localize LSTRING(AdjustTilt)]; // Tilting disabled due to sinking, interaction point offset and unsuitable animation
|
||||
[localize LSTRING(Deploy), localize LSTRING(Drop), /*_adjustText*/ localize LSTRING(Adjust)] call EFUNC(interaction,showMouseHint);
|
||||
|
||||
_unit setVariable [QGVAR(Deploy), [
|
||||
_unit, "DefaultAction",
|
||||
|
Reference in New Issue
Block a user