diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index 6ce3474af..61ac90451 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -358,7 +358,7 @@ if (_canBuild select 0) then { deleteVehicle _objectHelper; }; - if (DZE_BuildHeightLimit > 0 && abs(_objHDiff) > DZE_BuildHeightLimit) exitWith { + if (DZE_BuildHeightLimit > 0 && {_position select 2 > DZE_BuildHeightLimit}) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_PLAYER_168",DZE_BuildHeightLimit]; diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 416d3dbdf..d8b277204 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -262,6 +262,14 @@ if (_canBuild select 0) then { detach _object; deleteVehicle _object; }; + + if (DZE_BuildHeightLimit > 0 && {_position select 2 > DZE_BuildHeightLimit}) exitWith { + _isOk = false; + _cancel = true; + _reason = format[localize "STR_EPOCH_PLAYER_168",DZE_BuildHeightLimit]; + detach _object; + deleteVehicle _object; + }; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith { _isOk = false; diff --git a/SQF/dayz_code/compile/dze_buildChecks.sqf b/SQF/dayz_code/compile/dze_buildChecks.sqf index e08aeb252..30b29d2cf 100644 --- a/SQF/dayz_code/compile/dze_buildChecks.sqf +++ b/SQF/dayz_code/compile/dze_buildChecks.sqf @@ -98,7 +98,7 @@ if (!_canBuild) exitWith { [_canBuild, _isPole]; }; -if (DZE_BuildHeightLimit > 0 && ((getPosATL (vehicle player)) select 2) > DZE_BuildHeightLimit) exitWith {dayz_actionInProgress = false; format [localize "STR_EPOCH_PLAYER_168", DZE_BuildHeightLimit] call dayz_rollingMessages; [false, _isPole];}; +if (DZE_BuildHeightLimit > 0 && {([player] call fnc_getPos) select 2 > DZE_BuildHeightLimit}) exitWith {dayz_actionInProgress = false; format[localize "STR_EPOCH_PLAYER_168",DZE_BuildHeightLimit] call dayz_rollingMessages; [false, _isPole];}; // Also count safes, lockboxes, vanilla buildables, tents and stashes against DZE_BuildingLimit _buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"]; diff --git a/SQF/dayz_server/compile/zombie_Wildgenerate.sqf b/SQF/dayz_server/compile/zombie_Wildgenerate.sqf index 8eb6d70d3..234738a97 100644 --- a/SQF/dayz_server/compile/zombie_Wildgenerate.sqf +++ b/SQF/dayz_server/compile/zombie_Wildgenerate.sqf @@ -17,7 +17,7 @@ while {_counter < _amount} do { _method = "CAN_COLLIDE"; _position = [getMarkerPos "center",1,6500,1] call fn_selectRandomLocation; - if(_position call DZE_SafeZonePosCheck) exitWith {}; + if ([_position] call DZE_SafeZonePosCheck) exitWith {}; //Create Zed _agent = createAgent [_type, _position, [], 1, _method]; //Set Random Direction