Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General - Use objectParent for vehicle detection #10397

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ options.ignore = [
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax
"createSoundSource", # Greatly attenuated when in first person and in a vehicle
]

[sqf.var_all_caps]
options.ignore = [
"SLX_*", "ACE_*"
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (GVAR(Protractor)) exitWith {
true
};
if (weaponLowered ACE_player) exitWith { false };
if (vehicle ACE_player != ACE_player) exitWith { false };
if (!isNull objectParent ACE_player) exitWith { false };
if (currentWeapon ACE_player != primaryWeapon ACE_player) exitWith { false };

2 cutText ["", "PLAIN"];
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ GVAR(tempWindInfo) = false;
} else {
params ["_interactionType"];
// Ignore self-interaction menu, when in vehicle and when pick up is disabled
if (GVAR(enablePickUp) && {_interactionType == 0} && {vehicle ACE_player == ACE_player}) then {
if (GVAR(enablePickUp) && {_interactionType == 0} && {isNull objectParent ACE_player}) then {
// Show pick up actions on CfgAmmo's
call FUNC(renderPickUpInteraction);
};
Expand Down
4 changes: 2 additions & 2 deletions addons/advanced_throwing/functions/fnc_drawThrowable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private _posHeadRel = ACE_player selectionPosition "head";

private _leanCoef = (_posHeadRel select 0) - 0.15; // 0.15 counters the base offset
// Don't take leaning into account when weapon is lowered due to jiggling when walking side-ways (bandaid)
if (abs _leanCoef < 0.15 || {vehicle ACE_player != ACE_player} || {weaponLowered ACE_player}) then {
if (abs _leanCoef < 0.15 || {!isNull objectParent ACE_player} || {weaponLowered ACE_player}) then {
_leanCoef = 0;
};

Expand Down Expand Up @@ -144,7 +144,7 @@ if (ACE_player getVariable [QGVAR(dropMode), false]) then {

_posFin = _posFin vectorAdd (AGLToASL (positionCameraToWorld _cameraOffset));

if (vehicle ACE_player != ACE_player) then {
if (!isNull objectParent ACE_player) then {
// Counteract vehicle velocity including acceleration
private _vectorDiff = (velocity (vehicle ACE_player)) vectorMultiply (time - (ACE_player getVariable [QGVAR(lastTick), time]) + 0.01);
_posFin = _posFin vectorAdd _vectorDiff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ params ["", "_key"];
if (_key == 0) exitWith {
if (!isNull (ACE_player getVariable [QGVAR(activeThrowable), objNull])) then {
// Look gets automatically pointed at weapon direction on first LMB press when in FFV seat, require weapon to be up if in vehicle
private _inVehicle = vehicle ACE_player != ACE_player;
private _inVehicle = !isNull objectParent ACE_player;
if (!_inVehicle || {_inVehicle && {!weaponLowered ACE_player}}) then {
[ACE_player] call FUNC(throw);
};
Expand Down
2 changes: 1 addition & 1 deletion addons/advanced_throwing/functions/fnc_onMouseScroll.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (ACE_player getVariable [QGVAR(dropMode), false]) then {
};

// Limit distance in vehicle
if (vehicle ACE_player != ACE_player) then {
if (!isNull objectParent ACE_player) then {
ACE_player setVariable [QGVAR(dropDistance), (ACE_player getVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]) min 0.5];
};
} else {
Expand Down
2 changes: 1 addition & 1 deletion addons/attach/functions/fnc_canDetach.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
params ["_attachToVehicle", "_unit"];
TRACE_2("params",_attachToVehicle,_unit);

if ((vehicle _unit) != _unit) exitWith {false};
if (!isNull objectParent _unit) exitWith {false};

private _attachedList = _attachToVehicle getVariable [QGVAR(attached), []];
if ((count _attachedList) == 0) exitWith {false};
Expand Down
4 changes: 2 additions & 2 deletions addons/captives/functions/fnc_canEscortCaptive.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ params ["_unit", "_target"];
(_target getVariable [QGVAR(isHandcuffed), false]) &&
{isNull (attachedTo _target)} &&
{_target call EFUNC(common,isAwake)} &&
{(vehicle _unit) == _unit} &&
{(vehicle _target) == _target}
{isNull objectParent _unit} &&
{isNull objectParent _target}
2 changes: 1 addition & 1 deletion addons/captives/functions/fnc_canLoadCaptive.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if ((isNull _target) && {_unit getVariable [QGVAR(isEscorting), false]}) then {
};
} forEach (attachedObjects _unit);
};
if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {false};
if (isNull _target || {!isNull objectParent _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {false};

if (isNull _vehicle) then {
// Looking at a captive unit, get nearest vehicle with valid seat:
Expand Down
2 changes: 1 addition & 1 deletion addons/captives/functions/fnc_canRemoveHandcuffs.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ params ["_unit", "_target"];
//Unit is handcuffed and not currently being escorted
_target getVariable [QGVAR(isHandcuffed), false] &&
{isNull (attachedTo _target)} &&
{(vehicle _target) == _target}
{isNull objectParent _target}
2 changes: 1 addition & 1 deletion addons/captives/functions/fnc_doLoadCaptive.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (isNull _target && {_unit getVariable [QGVAR(isEscorting), false]}) then {
};
} forEach (attachedObjects _unit);
};
if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {WARNING("");};
if (isNull _target || {!isNull objectParent _target} || {!(_target getVariable [QGVAR(isHandcuffed), false])}) exitWith {WARNING("");};

if (isNull _vehicle) then {
// Looking at a captive unit, get nearest vehicle with valid seat:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params ["_unit", "_newAnimation"];
TRACE_2("AnimChanged",_unit,_newAnimation);
if (_unit == (vehicle _unit)) then {
if (isNull objectParent _unit) then {
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {_unit call EFUNC(common,isAwake)}) then {
TRACE_1("Handcuff animation interrupted",_newAnimation);
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
Expand Down
4 changes: 2 additions & 2 deletions addons/captives/functions/fnc_setHandcuffed.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if (_state) then {
params ["_unit"];
if !(_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {};

if ((vehicle _unit) == _unit) then {
if (isNull objectParent _unit) then {
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
} else {
Expand Down Expand Up @@ -91,7 +91,7 @@ if (_state) then {
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
_unit setVariable [QGVAR(handcuffAnimEHID), -1];

if (((vehicle _unit) == _unit) && {_unit call EFUNC(common,isAwake)}) then {
if ((isNull objectParent _unit) && {_unit call EFUNC(common,isAwake)}) then {
//Break out of hands up animation loop
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
};
Expand Down
8 changes: 4 additions & 4 deletions addons/captives/functions/fnc_setSurrendered.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) exitWit
};

if (_state) then {
if ((vehicle _unit) != _unit) exitWith {WARNING("Cannot surrender while mounted");};
if (!isNull objectParent _unit) exitWith {WARNING("Cannot surrender while mounted");};
if (_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {WARNING("Cannot surrender while handcuffed");};

_unit setVariable [QGVAR(isSurrendering), true, true];
Expand All @@ -57,7 +57,7 @@ if (_state) then {
// fix anim on mission start (should work on dedicated servers)
[{
params ["_unit"];
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
if (_unit getVariable [QGVAR(isSurrendering), false] && {isNull objectParent _unit}) then {
//Adds an animation changed eh
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
Expand Down Expand Up @@ -89,7 +89,7 @@ if (_state) then {
if !(_unit call EFUNC(common,isAwake)) exitWith {}; //don't touch animations if unconscious

//if we are in "hands up" animationState, crack it now
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) then {
if ((isNull objectParent _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) then {
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
} else {
//spin up a PFEH, to watching animationState for the next 20 seconds to make sure we don't enter "hands up"
Expand All @@ -102,7 +102,7 @@ if (_state) then {
[_pfID] call CBA_fnc_removePerFrameHandler;
};
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) exitWith {
if ((isNull objectParent _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) exitWith {
[_pfID] call CBA_fnc_removePerFrameHandler;
//Break out of hands up animation loop
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
Expand Down
6 changes: 3 additions & 3 deletions addons/common/functions/fnc_doAnimation.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ if (_animation == "") then {
TRACE_2("",local _unit,vehicle _unit);
switch (_priority) do {
case 0: {
if (_unit == vehicle _unit) then {
if (isNull objectParent _unit) then {
[QGVAR(playMove), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles.
[QGVAR(playMove), [_unit, _animation]] call CBA_fnc_globalEvent;
};
};
case 1: {
if (_unit == vehicle _unit) then {
if (isNull objectParent _unit) then {
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles.
Expand All @@ -50,7 +50,7 @@ switch (_priority) do {
};
case 2: {
// try playMoveNow first
if (_unit == vehicle _unit) then {
if (isNull objectParent _unit) then {
[QGVAR(playMoveNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
} else {
// Execute on all machines. PlayMove and PlayMoveNow are bugged: They have local effects when executed on remote machines inside vehicles.
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_headBugFix.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private _anim = animationState _unit;
[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_serverEvent;
[QGVAR(headbugFixUsed), [profileName, _anim]] call CBA_fnc_localEvent;

if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};
if (!isNull objectParent _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false};

["ace_headBugFix", true] call FUNC(setDisableUserInputStatus);

Expand Down
10 changes: 5 additions & 5 deletions addons/dagr/functions/fnc_menuInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ GVAR(menuRun) = true;
GVAR(vectorConnected) = false;
GVAR(displaySelection) = "WP";
switch (GVAR(selection)) do {
case 0: { DAGR_WP_INFO = GVAR(wp0); };
case 1: { DAGR_WP_INFO = GVAR(wp1); };
case 2: { DAGR_WP_INFO = GVAR(wp2); };
case 3: { DAGR_WP_INFO = GVAR(wp3); };
case 4: { DAGR_WP_INFO = GVAR(wp4); };
case 0: { GVAR(wp_info) = GVAR(wp0); };
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also changed this untagged global var,
I couldn't find anyone using it directly so I think it's safe

case 1: { GVAR(wp_info) = GVAR(wp1); };
case 2: { GVAR(wp_info) = GVAR(wp2); };
case 3: { GVAR(wp_info) = GVAR(wp3); };
case 4: { GVAR(wp_info) = GVAR(wp4); };
};
if (!GVAR(busy)) then {
GVAR(showInfoUpdating) = true;
Expand Down
4 changes: 2 additions & 2 deletions addons/dagr/functions/fnc_outputWP.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ GVAR(outputPFH) = [{
private _dagrGrid = format ["%1 %2", (_gridArrayX select [0,4]), (_gridArrayY select [0,4])];

// WP Grid
private _xGrid2 = floor (DAGR_WP_INFO / 10000);
private _yGrid2 = DAGR_WP_INFO - _xGrid2 * 10000;
private _xGrid2 = floor (GVAR(wp_info) / 10000);
private _yGrid2 = GVAR(wp_info) - _xGrid2 * 10000;

private _xCoord2 = switch true do {
case (_xGrid2 >= 1000): { "" + str(_xGrid2) };
Expand Down
2 changes: 1 addition & 1 deletion addons/explosives/functions/fnc_interactEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TRACE_1("Explosives interactEH",_interactionType);
// If player somehow gets a defusal kit during keyDown, they will just have to reopen menu
if (
_interactionType != 0
|| {vehicle ACE_player != ACE_player}
|| {!isNull objectParent ACE_player}
|| {(ACE_player call EFUNC(common,uniqueItems)) findAny GVAR(defusalKits) == -1}
) exitWith {};

Expand Down
4 changes: 2 additions & 2 deletions addons/fastroping/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// Keybinds
["ACE3 Vehicles", QGVAR(fastRope), localize LSTRING(Interaction_fastRope), {
if ((vehicle ACE_player) == ACE_player) exitWith {false};
if (isNull objectParent ACE_player) exitWith {false};
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
if ([ACE_player, vehicle ACE_player] call FUNC(canFastRope)) then {
[ACE_player, vehicle ACE_player] call FUNC(fastRope);
Expand All @@ -19,7 +19,7 @@
}, ""] call CBA_fnc_addKeybind;

["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), {
if ((vehicle ACE_player) == ACE_player) exitWith {false};
if (isNull objectParent ACE_player) exitWith {false};
if !([ACE_player, vehicle ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false};
if ([vehicle ACE_player] call FUNC(canCutRopes)) then {
[vehicle ACE_player] call FUNC(cutRopes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ params ["_interactionType"];
// Ignore when self-interaction, mounted vehicle interaction, or water source actions are disabled
if (
_interactionType != 0
|| {vehicle ACE_player != ACE_player}
|| {!isNull objectParent ACE_player}
|| {XGVAR(waterSourceActions) == 0}
) exitWith {};

Expand Down
6 changes: 3 additions & 3 deletions addons/field_rations/functions/fnc_consumeItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ _consumeText = format [_consumeText, _displayName];
private _stanceIndex = ["STAND", "CROUCH", "PRONE"] find stance _player;

// Handle in vehicle when stance is UNDEFINED
if (vehicle _player != _player) then {_stanceIndex = 0};
if (!isNull objectParent _player) then {_stanceIndex = 0};

private _consumeAnim = getArray (_config >> QXGVAR(consumeAnims)) param [_stanceIndex, "", [""]];
private _consumeSound = getArray (_config >> QXGVAR(consumeSounds)) param [_stanceIndex, "", [""]];

private _soundPlayed = if (_consumeAnim != "" && {vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}}) then {
private _soundPlayed = if (_consumeAnim != "" && {isNull objectParent _player && {!(_player call EFUNC(common,isSwimming))}}) then {
// Store current animation for resetting
_player setVariable [QGVAR(previousAnim), animationState _player];
[_player, _consumeAnim, 1] call EFUNC(common,doAnimation);
Expand Down Expand Up @@ -109,7 +109,7 @@ private _fnc_onFailure = {
TRACE_1("Consume item failed",_args);

// Reset animation if needed
if (vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}) then {
if (isNull objectParent _player && {!(_player call EFUNC(common,isSwimming))}) then {
private _previousAnim = _player getVariable [QGVAR(previousAnim), ""];
if (_previousAnim != "") then {
[_player, _previousAnim, 2] call EFUNC(common,doAnimation);
Expand Down
2 changes: 1 addition & 1 deletion addons/field_rations/functions/fnc_drinkFromSource.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private _fnc_onFailure = {
_args params ["_player"];

// Reset animation if needed
if (vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}) then {
if (isNull objectParent _player && {!(_player call EFUNC(common,isSwimming))}) then {
private _previousAnim = _player getVariable [QGVAR(previousAnim), ""];
if (_previousAnim != "") then {
[_player, _previousAnim, 2] call EFUNC(common,doAnimation);
Expand Down
2 changes: 1 addition & 1 deletion addons/field_rations/functions/fnc_update.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private _hunger = _player getVariable [QXGVAR(hunger), 0];

// Determine base change based on work multiplier
private _currentWork = 1;
if (vehicle _player == _player && {isTouchingGround _player}) then {
if (isNull objectParent _player && {isTouchingGround _player}) then {
private _speed = vectorMagnitude velocity _player;
_currentWork = linearConversion [2, 7, _speed, 1, 2, true];
};
Expand Down
4 changes: 2 additions & 2 deletions addons/finger/functions/fnc_keyPress.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if (!alive ACE_player) exitWith {false};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false};
//make sure player is dismounted or in a static weapon:
if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false};
if ((!isNull objectParent ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) exitWith {false};
//Check camera view (not in GUNNER)
if !(cameraView in ["INTERNAL", "EXTERNAL"]) exitWith {false};
//Exit if run recently (run every 1 seconds)
Expand All @@ -46,7 +46,7 @@ private _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]
{
if ((((eyePos _x) vectorDistance _playerEyePosASL) < GVAR(maxRange)) &&
{alive _x} &&
{(_x == (vehicle _x)) || {(vehicle _x) isKindOf "StaticWeapon"}} &&
{(isNull objectParent _x) || {(vehicle _x) isKindOf "StaticWeapon"}} &&
{GVAR(indicatorForSelf) || {_x != ACE_player}} &&
{((lineIntersectsSurfaces [(eyePos _x), _playerEyePosASL, vehicle ACE_player, vehicle _x]) isEqualTo [])} &&
{[_x] call EFUNC(common,isPlayer)}) then {
Expand Down
2 changes: 1 addition & 1 deletion addons/finger/functions/fnc_perFrameEH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (!alive ACE_player) then {GVAR(fingersHash) = createHashMap};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = createHashMap};
// Make sure player is dismounted or in a static weapon:
if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = createHashMap};
if ((!isNull objectParent ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = createHashMap};

private _iconBaseSize = GVAR(sizeCoef) * BASE_SIZE * 0.10713 * (call EFUNC(common,getZoom));

Expand Down
4 changes: 2 additions & 2 deletions addons/interact_menu/functions/fnc_keyDown.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ GVAR(openedMenuType) = _menuType;
GVAR(lastTimeSearchedActions) = -1000;
GVAR(ParsedTextCached) = [];

GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) ||
GVAR(useCursorMenu) = (!isNull objectParent ACE_player) ||
(!(isNull (ACE_controlledUAV select 0))) ||
visibleMap ||
(!isNull curatorCamera) ||
Expand Down Expand Up @@ -117,7 +117,7 @@ GVAR(selfMenuOffset) = (AGLToASL (positionCameraToWorld [0, 0, 2])) vectorDiff (
if (GVAR(openedMenuType) == 0) then {
if (isNull curatorCamera) then {
if (isNull (ACE_controlledUAV select 0)) then {
if (vehicle ACE_player != ACE_player) then {
if (!isNull objectParent ACE_player) then {
GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]];
GVAR(expanded) = true;
GVAR(expandedTime) = diag_tickTime;
Expand Down
2 changes: 1 addition & 1 deletion addons/interact_menu/functions/fnc_renderActionPoints.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ GVAR(collectedActionPoints) resize 0;
if (GVAR(openedMenuType) == 0) then {
if (isNull curatorCamera) then {
if (isNull (ACE_controlledUAV select 0)) then {
if (vehicle ACE_player == ACE_player) then {
if (isNull objectParent ACE_player) then {
if (diag_tickTime > GVAR(lastTimeSearchedActions) + 0.20) then {
// Once every 0.2 secs, collect nearby objects active and visible action points and render them
call _fnc_renderNearbyActions;
Expand Down
2 changes: 1 addition & 1 deletion addons/interact_menu/functions/fnc_renderBaseMenu.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private _pos = if((count _this) > 2) then {

// For non-self actions, exit if the action is too far away or ocluded
private _distanceToBasePoint = 0; //This will be 0 for self/zeus/in-vehicle (used later to check sub action distance)
if ((GVAR(openedMenuType) == 0) && {isNull (ACE_controlledUAV select 0)} && {vehicle ACE_player == ACE_player} && {isNull curatorCamera} &&
if ((GVAR(openedMenuType) == 0) && {isNull (ACE_controlledUAV select 0)} && {isNull objectParent ACE_player} && {isNull curatorCamera} &&
{
private _headPos = ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot");
_distanceToBasePoint = _headPos distance _pos;
Expand Down
Loading
Loading