nearestObjects -> nearestTerrainObjects

Arma 2.1 no longer support Trash Loot / Phonebooth (smaller terrain objects) within the nearestObjects command. So also added nearestTerrainObjects within the relevant lines
This commit is contained in:
He-Man 2022-09-07 19:09:38 +02:00
parent d238c8ba13
commit fdc7604697
3 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ if (diag_tickTime - EPOCH_lastTrash > 2) then {
_lootAnimalObj = objNull;
_bankTerminal = objNull;
_trashType = 0;
_objects = nearestObjects[player, [], 2];
_objects = nearestObjects[player, [], 2] + nearestTerrainObjects [player, [], 2];
{
_found = false;
_foundTerminal = false;

View File

@ -22,7 +22,7 @@ switch (_type) do {
case 0:
{
private ["_test1","_test2","_find"];
_nearObjects = nearestObjects [player, [], _dist];
_nearObjects = nearestObjects [player, [], _dist] + nearestTerrainObjects [player, [], _dist];
_test1 = 0;
{
_test2 = _x;
@ -39,7 +39,7 @@ switch (_type) do {
};
case 2:
{
_nearObjects = nearestObjects [player, [], _dist];
_nearObjects = nearestObjects [player, [], _dist] + nearestTerrainObjects [player, [], _dist];
_check = _check select 0;
_tmpResult = false;
{

View File

@ -50,7 +50,7 @@ class CfgActionMenu
dyna_mapDeathMarker = "(((getArray(('CfgMarkerSets' call EPOCH_returnConfig) >> 'DeathMarker' >> 'markerArray') select 0) select 0) in allMapMarkers)";
dyna_AtHome = "call {_nearjammers = (nearestObjects[player, call EPOCH_JammerClasses, call EPOCH_MaxJammerRange]) select {player distance _x < (getnumber (getmissionconfig 'cfgEpochClient' >> 'CfgJammers' >> (typeof _x) >> 'buildingJammerRange'))};if (_nearjammers isEqualTo []) exitwith {false};_nearestJammer = _nearjammers select 0;((_nearestJammer getVariable['BUILD_OWNER', '-1']) in[getPlayerUID player, Epoch_my_GroupUID])}";
dyna_Watersource = "call {_nearObjects = nearestObjects [player, [], 2];_check = 'water';_ok = false;{if (alive _x) then {_ok = [_x, _check] call EPOCH_worldObjectType;};if (_ok) exitWith {};} forEach _nearObjects;_ok}";
dyna_Watersource = "call {_nearObjects = nearestObjects [player, [], 2] + nearestTerrainObjects [player, [], 2];_check = 'water';_ok = false;{if (alive _x) then {_ok = [_x, _check] call EPOCH_worldObjectType;};if (_ok) exitWith {};} forEach _nearObjects;_ok}";
dyna_DirtyWatersource = "((surfaceiswater position player) && (position player isFlatEmpty [-1, -1, -1, -1, 0, true] isEqualTo []) && (getPosASL player select 2 > 2) && (getPosATL player select 2 < 0.1))";
dyna_Paintobj = "objnull"; // <--- internal use only!
};