tried to fix block selection in map rendering a bit
authorPerttu Ahola <celeron55@gmail.com>
Mon, 27 Jun 2011 06:50:34 +0000 (09:50 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 27 Jun 2011 06:50:34 +0000 (09:50 +0300)
src/map.cpp

index 0f3741691532da3283786c80c93502f63a7578be..79f2a40aff5e98f1c5e5d2b4b2b58d5a675f5ac4 100644 (file)
@@ -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;