aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlhofhansl <lhofhansl@yahoo.com>2016-12-18 04:25:42 -0800
committerZeno- <kde.psych@gmail.com>2016-12-18 22:25:42 +1000
commite4f7ce1985bda1c37b62f24d028828c5d3851ca2 (patch)
tree580953dddac60a94ae7af0e13c4ec23a3f8a7dd7
parent6d4e7f223a8d79d820546ad750448ee4ecbb1e55 (diff)
downloadminetest-e4f7ce1985bda1c37b62f24d028828c5d3851ca2.tar.gz
minetest-e4f7ce1985bda1c37b62f24d028828c5d3851ca2.tar.bz2
minetest-e4f7ce1985bda1c37b62f24d028828c5d3851ca2.zip
Fix occlusing counting (#4922)
-rw-r--r--src/clientmap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clientmap.cpp b/src/clientmap.cpp
index 8691cc0b2..db71d4b57 100644
--- a/src/clientmap.cpp
+++ b/src/clientmap.cpp
@@ -132,9 +132,9 @@ static bool isOccluded(Map *map, v3s16 p0, v3s16 p1, float step, float stepfac,
else
is_transparent = (f.solidness != 2);
if(!is_transparent){
- if(count == needed_count)
- return true;
count++;
+ if(count >= needed_count)
+ return true;
}
step *= stepfac;
}