mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix the fov test. Issue not fixed
This commit is contained in:
parent
53ce7d0be4
commit
c397246534
@ -29,44 +29,44 @@ _fnc_renderNearbyActions = {
|
|||||||
{
|
{
|
||||||
_target = _x;
|
_target = _x;
|
||||||
|
|
||||||
// Quick oclussion test. Exit for object more than 2 m behind the camera plane
|
// Quick oclussion test. Exit for object more than 1 m behind the camera plane
|
||||||
_lambda = ((getPosASL _x) vectorDiff _cameraPos) vectorDotProduct _cameraDir;
|
_lambda = ((getPosASL _x) vectorDiff _cameraPos) vectorDotProduct _cameraDir;
|
||||||
if (_lambda < -2) exitWith {};
|
if (_lambda > -1) then {
|
||||||
|
_numInteractions = 0;
|
||||||
|
// Prevent interacting with yourself or your own vehicle
|
||||||
|
if (_target != ACE_player && {_target != vehicle ACE_player}) then {
|
||||||
|
|
||||||
_numInteractions = 0;
|
// Iterate through object actions, find base level actions and render them if appropiate
|
||||||
// Prevent interacting with yourself or your own vehicle
|
_actionsVarName = format [QGVAR(Act_%1), typeOf _target];
|
||||||
if (_target != ACE_player && {_target != vehicle ACE_player}) then {
|
GVAR(objectActionList) = _target getVariable [QGVAR(actions), []];
|
||||||
|
{
|
||||||
|
// Only render them directly if they are base level actions
|
||||||
|
if (count (_x select 1) == 0) then {
|
||||||
|
// Try to render the menu
|
||||||
|
_action = _x;
|
||||||
|
if ([_target, _action] call FUNC(renderBaseMenu)) then {
|
||||||
|
_numInteractions = _numInteractions + 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach GVAR(objectActionList);
|
||||||
|
|
||||||
// Iterate through object actions, find base level actions and render them if appropiate
|
// Iterate through base level class actions and render them if appropiate
|
||||||
_actionsVarName = format [QGVAR(Act_%1), typeOf _target];
|
_classActions = missionNamespace getVariable [_actionsVarName, []];
|
||||||
GVAR(objectActionList) = _target getVariable [QGVAR(actions), []];
|
{
|
||||||
{
|
|
||||||
// Only render them directly if they are base level actions
|
|
||||||
if (count (_x select 1) == 0) then {
|
|
||||||
// Try to render the menu
|
|
||||||
_action = _x;
|
_action = _x;
|
||||||
|
// Try to render the menu
|
||||||
if ([_target, _action] call FUNC(renderBaseMenu)) then {
|
if ([_target, _action] call FUNC(renderBaseMenu)) then {
|
||||||
_numInteractions = _numInteractions + 1;
|
_numInteractions = _numInteractions + 1;
|
||||||
};
|
};
|
||||||
};
|
} forEach _classActions;
|
||||||
} forEach GVAR(objectActionList);
|
|
||||||
|
|
||||||
// Iterate through base level class actions and render them if appropiate
|
// Limit the amount of objects the player can interact with
|
||||||
_classActions = missionNamespace getVariable [_actionsVarName, []];
|
if (_numInteractions > 0) then {
|
||||||
{
|
_numInteractObjects = _numInteractObjects + 1;
|
||||||
_action = _x;
|
|
||||||
// Try to render the menu
|
|
||||||
if ([_target, _action] call FUNC(renderBaseMenu)) then {
|
|
||||||
_numInteractions = _numInteractions + 1;
|
|
||||||
};
|
};
|
||||||
} forEach _classActions;
|
|
||||||
|
|
||||||
// Limit the amount of objects the player can interact with
|
|
||||||
if (_numInteractions > 0) then {
|
|
||||||
_numInteractObjects = _numInteractObjects + 1;
|
|
||||||
};
|
};
|
||||||
|
if (_numInteractObjects >= MAXINTERACTOBJECTS) exitWith {};
|
||||||
};
|
};
|
||||||
if (_numInteractObjects >= MAXINTERACTOBJECTS) exitWith {};
|
|
||||||
|
|
||||||
} forEach _nearestObjects;
|
} forEach _nearestObjects;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user