From d3131aeae79141961efdeff38446e73d027f13ff Mon Sep 17 00:00:00 2001 From: paramat Date: Mon, 13 Mar 2017 21:35:29 +0000 Subject: Map generation limit: Rewrite The previous implementation applied the setting to blockpos_over_limit(), objectpos_over_limit() and in createSector(), causing many bugs near the world edge. First revert the previous implementation. Rename blockpos_over_limit() to blockpos_over_max_limit() for clarity. Add a new function to mapblock.h called blockpos_over_mapgen_limit() that checks against the map_generation_limit setting, and call this only from the code that decides where mapgen stops. Use MAX_MAP_GENERATION_LIMIT in objectpos_over_limit() to reduce the chance of bugs, there is no need to use map_generation_limit here. --- src/clientiface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/clientiface.cpp') diff --git a/src/clientiface.cpp b/src/clientiface.cpp index 11054969c..39223d3eb 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -238,9 +238,9 @@ void RemoteClient::GetNextBlocks ( continue; /* - Do not go over-limit + Do not go over max mapgen limit */ - if (blockpos_over_limit(p)) + if (blockpos_over_max_limit(p)) continue; // If this is true, inexistent block will be made from scratch -- cgit v1.2.3