dze_buildchecks plot pole distance fix (#1801)

Fixes the proper distance checks for dze_buildChecks.
This commit is contained in:
oiad
2016-11-27 08:03:09 +13:00
committed by ebaydayz
parent effabd711d
commit 511dfd4025

View File

@@ -15,13 +15,19 @@ if (isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then
_isPole = (_classname == "Plastic_Pole_EP1_DZ");
_isLandFireDZ = (_classname == "Land_Fire_DZ");
_distance = if (_isPole) then {DZE_PlotPole select 1} else {DZE_PlotPole select 0};
_canBuild = false;
_nearestPole = objNull;
_ownerID = 0;
_friendlies = [];
_plotcheck = [player, false] call FNC_find_plots;
if (_isPole) then {
_plotcheck = [player, true] call FNC_find_plots;
_distance = DZE_PlotPole select 1;
} else {
_plotcheck = [player, false] call FNC_find_plots;
_distance = DZE_PlotPole select 0;
};
_IsNearPlot = _plotcheck select 1;
_nearestPole = _plotcheck select 2;