Use nearEntities for plot pole searches

Also made 73899d5 compatible with DZE_permanentPlot = false; at the
request of @oiad
This commit is contained in:
ebayShopper
2017-03-29 16:04:48 -04:00
parent 30d961931f
commit 746b921321
9 changed files with 14 additions and 21 deletions

View File

@@ -8,7 +8,7 @@ _friendName = _userList lbText (lbCurSel _userList);
if (_friendUID == "") exitWith {};
_plots = nearestObjects [[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"],15];
_plots = ([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15];
_thePlot = _plots select 0;
_friends = _thePlot getVariable ["plotfriends",[]];

View File

@@ -1,7 +1,7 @@
private ["_name","_plots","_friendlies","_thePlot"];
lbClear 7002;
_plots = nearestObjects [[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"],15];
_plots = ([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15];
_thePlot = _plots select 0;
_friendlies = _thePlot getVariable ["plotfriends", []];
{

View File

@@ -2,7 +2,7 @@ private ["_range","_buildables","_count","_colour","_ctrl","_target"];
disableSerialization;
_range = DZE_PlotPole select 0;
_target = nearestObject [[player] call FNC_getPos,"Plastic_Pole_EP1_DZ"];
_target = (([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15]) select 0;
// Also count safes, lockboxes, vanilla buildables, tents and stashes against DZE_BuildingLimit
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"];
_count = count (nearestObjects [_target,_buildables,_range]);

View File

@@ -2,7 +2,7 @@ private ["_pos","_plots","_thePlot","_friends","_toRemove","_newList"];
_pos = _this select 0;
if (_pos < 0) exitWith {};
_plots = nearestObjects [[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"],15];
_plots = ([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15];
_thePlot = _plots select 0;
_friends = _thePlot getVariable ["plotfriends", []];
_toRemove = (_friends select _pos);

View File

@@ -6,7 +6,7 @@ _density = 3; // density of markers per ring
_model = "Sign_sphere100cm_EP1"; // marker model to use on rings
// Possible ones to use :: Sign_sphere10cm_EP1 Sign_sphere25cm_EP1 Sign_sphere100cm_EP1
_thePlot = (nearestObjects [player, ["Plastic_Pole_EP1_DZ"],15]) select 0;
_thePlot = (([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15]) select 0;
_center = getPosASL _thePlot;
_radius = DZE_PlotPole select 0;
_obj = false;