aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-06-27 09:50:34 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-06-27 09:50:34 +0300
commit282912caa0f8a19d5b5fb94a3cb6a41432a3a2df (patch)
tree8f71b14d881ffe55fbd723c1ab808e0f155cf79f
parentccf5eae7512d3b6601fb056fd8781f5954b09e25 (diff)
downloadminetest-282912caa0f8a19d5b5fb94a3cb6a41432a3a2df.tar.gz
minetest-282912caa0f8a19d5b5fb94a3cb6a41432a3a2df.tar.bz2
minetest-282912caa0f8a19d5b5fb94a3cb6a41432a3a2df.zip
tried to fix block selection in map rendering a bit
-rw-r--r--src/map.cpp12
1 files 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;