From c00b0ad1afce16e8c42a0dfb4fb13f060781b7c6 Mon Sep 17 00:00:00 2001 From: BigEgg Date: Sat, 7 Oct 2017 23:53:20 -0500 Subject: [PATCH] Added build height check to modular_build.sqf --- SQF/dayz_code/actions/modular_build.sqf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index df6630c69..809bdb000 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -357,6 +357,20 @@ if (_canBuild select 0) then { detach _objectHelper; deleteVehicle _objectHelper; }; + + if (DZE_BuildHeightLimit > 0 && abs(_objHDiff) > DZE_BuildHeightLimit) exitWith { + _isOk = false; + _cancel = true; + _reason = format[localize "STR_EPOCH_PLAYER_168",DZE_BuildHeightLimit]; + detach _object; + deleteVehicle _object; + if (_VectorWorkAround) then { + detach _object2; + deleteVehicle _object2; + }; + detach _objectHelper; + deleteVehicle _objectHelper; + }; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith { _isOk = false;