Fix _distance in dze_buildChecks

Passing false as the second parameter to fnc_find_plots always returns
DZE_PlotPole select 0. In dze_buildchecks we want to use DZE_PlotPole
select 1 if the classname is a plot pole.

_distance is already defined as DZE_PlotPole select 0 in the other three
files, so it is redundant to redefine it as the return value.

In player_upgrade.sqf the check for DZE_permanentPlot is not necessary,
because FNC_check_access handles both cases.
This commit is contained in:
ebaydayz
2016-06-16 20:15:51 -04:00
parent d74130b477
commit 5b7ef99569
4 changed files with 7 additions and 20 deletions

View File

@@ -21,12 +21,9 @@ _canBuild = false;
_nearestPole = objNull;
_ownerID = 0;
_friendlies = [];
_distance = DZE_PlotPole select 0;
_needText = localize "str_epoch_player_246";
_plotcheck = [player, false] call FNC_find_plots;
_distance = _plotcheck select 0;
_IsNearPlot = _plotcheck select 1;
_nearestPole = _plotcheck select 2;