1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 07:38:48 -05:00

Fix occlusing counting (#4922)

This commit is contained in:
lhofhansl 2016-12-18 04:25:42 -08:00 committed by Zeno-
parent 6d4e7f223a
commit e4f7ce1985

View File

@ -132,9 +132,9 @@ static bool isOccluded(Map *map, v3s16 p0, v3s16 p1, float step, float stepfac,
else else
is_transparent = (f.solidness != 2); is_transparent = (f.solidness != 2);
if(!is_transparent){ if(!is_transparent){
if(count == needed_count)
return true;
count++; count++;
if(count >= needed_count)
return true;
} }
step *= stepfac; step *= stepfac;
} }