From 282912caa0f8a19d5b5fb94a3cb6a41432a3a2df Mon Sep 17 00:00:00 2001
From: Perttu Ahola <celeron55@gmail.com>
Date: Mon, 27 Jun 2011 09:50:34 +0300
Subject: [PATCH] tried to fix block selection in map rendering a bit

---
 src/map.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/map.cpp b/src/map.cpp
index 0f3741691..79f2a40af 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -3378,13 +3378,13 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
 
 	// Take a fair amount as we will be dropping more out later
 	v3s16 p_blocks_min(
-			p_nodes_min.X / MAP_BLOCKSIZE - 1,
-			p_nodes_min.Y / MAP_BLOCKSIZE - 1,
-			p_nodes_min.Z / MAP_BLOCKSIZE - 1);
+			p_nodes_min.X / MAP_BLOCKSIZE - 2,
+			p_nodes_min.Y / MAP_BLOCKSIZE - 2,
+			p_nodes_min.Z / MAP_BLOCKSIZE - 2);
 	v3s16 p_blocks_max(
-			p_nodes_max.X / MAP_BLOCKSIZE,
-			p_nodes_max.Y / MAP_BLOCKSIZE,
-			p_nodes_max.Z / MAP_BLOCKSIZE);
+			p_nodes_max.X / MAP_BLOCKSIZE + 1,
+			p_nodes_max.Y / MAP_BLOCKSIZE + 1,
+			p_nodes_max.Z / MAP_BLOCKSIZE + 1);
 	
 	u32 vertex_count = 0;
 	
-- 
GitLab