Fix occlusing counting (#4922)
authorlhofhansl <lhofhansl@yahoo.com>
Sun, 18 Dec 2016 12:25:42 +0000 (04:25 -0800)
committerZeno- <kde.psych@gmail.com>
Sun, 18 Dec 2016 12:25:42 +0000 (22:25 +1000)
src/clientmap.cpp

index 8691cc0b21798450824851578b9b804b8686d7f4..db71d4b577caed60208c1e18a8a0213f8a11f466 100644 (file)
@@ -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;
        }