mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
Make water invisible next to underwater glass
This commit is contained in:
parent
4f71a9fbde
commit
c1d92d72e1
@ -396,7 +396,21 @@ inline u8 face_contents(content_t m1, content_t m2)
|
|||||||
if(makes_face == false)
|
if(makes_face == false)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(content_solidness(m1) > content_solidness(m2))
|
u8 c1 = content_solidness(m1);
|
||||||
|
u8 c2 = content_solidness(m2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Special case for half-transparent content.
|
||||||
|
|
||||||
|
This makes eg. the water (solidness=1) surrounding an underwater
|
||||||
|
glass block (solidness=0, visual_solidness=1) not get drawn.
|
||||||
|
*/
|
||||||
|
if(c1 == 1 && c2 == 0 && content_features(m2).visual_solidness != 0)
|
||||||
|
return 0;
|
||||||
|
if(c2 == 1 && c1 == 0 && content_features(m1).visual_solidness != 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if(c1 > c2)
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else
|
||||||
return 2;
|
return 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user