mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
dze_buildchecks plot pole distance fix (#1801)
Fixes the proper distance checks for dze_buildChecks.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user