Possible fix to bases of islands/hills getting culled out too early
authorPerttu Ahola <celeron55@gmail.com>
Thu, 3 Nov 2011 13:10:58 +0000 (15:10 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 3 Nov 2011 13:10:58 +0000 (15:10 +0200)
src/map.cpp

index 6ba33288d7a07c20f88dcdb84da96e8e6af40d85..d4eefc737ffbc2bdc35c96ea1428d57342a868cd 100644 (file)
@@ -3844,8 +3844,8 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
                                Occlusion culling
                        */
 
-                       v3s16 cpn = v3s16(block->getPos() * MAP_BLOCKSIZE)
-                                       + v3s16(MAP_BLOCKSIZE)/2;
+                       v3s16 cpn = block->getPos() * MAP_BLOCKSIZE;
+                       cpn += v3s16(MAP_BLOCKSIZE/2, MAP_BLOCKSIZE/2, MAP_BLOCKSIZE/2);
                        float step = BS*1;
                        float stepfac = 1.1;
                        float startoff = BS*1;