Fix black display inside opaque water
authorMatthew I <matttpt@gmail.com>
Sun, 29 Jul 2012 01:41:32 +0000 (21:41 -0400)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 31 Aug 2012 14:50:12 +0000 (17:50 +0300)
Opaque water's solidness was being set to 2, like a normal node.
When you swim, it is treated like a solid block, and the display
goes black.  Setting it to 1 like transparent water allows you to
see.

It looks somewhat awkward when you swim, look up, and see an opaque
wall of water (the surface), but there isn't much that can be done
about it.  If you made the water transparent so it looked good,
it would defeat the purpose :) .

src/nodedef.cpp

index e38061e30d1b9231b6a850235db91b6ef400e9ad..d644dc229d2c4af9f3fbf3edc073aba6f818aaee 100644 (file)
@@ -556,8 +556,6 @@ public:
                                        f->solidness = 0;
                                } else {
                                        f->solidness = 1;
-                                       if(f->alpha == 255)
-                                               f->solidness = 2;
                                        f->backface_culling = false;
                                }
                                break;