Fix flowing water being always opaque
authorPerttu Ahola <celeron55@gmail.com>
Tue, 15 Nov 2011 20:21:12 +0000 (22:21 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:45 +0000 (19:13 +0200)
src/game.cpp
src/nodedef.cpp
src/nodedef.h

index 7efce23a4e83f0b4a2942d2b5de28cb507c6fad9..bb1998066b5e9bdd0c246767a2e28a996c524ed2 100644 (file)
@@ -645,7 +645,7 @@ void the_game(
        IWritableNodeDefManager *nodedef = createNodeDefManager();
 
        // Fill node feature table with default definitions
-       content_mapnode_init(nodedef);
+       //content_mapnode_init(nodedef);
 
        /*
                Create server.
index c86a3aefcb8528071f6158a47a8a6aa4b942f86b..c1aee5df4bdf21f4f2f9c4baeeda79380a3efc72 100644 (file)
@@ -445,6 +445,9 @@ public:
                                f->special_materials[j]->setFlag(video::EMF_BILINEAR_FILTER, false);
                                f->special_materials[j]->setFlag(video::EMF_FOG_ENABLE, true);
                                f->special_materials[j]->setTexture(0, f->special_aps[j]->atlas);
+                               if(f->alpha != 255)
+                                       f->special_materials[j]->MaterialType =
+                                                       video::EMT_TRANSPARENT_VERTEX_ALPHA;
                        }
                }
 #endif
index b78b09d4c558448f725f7159657552f7ed378d09..b7cca52d04ff8b6920a278e437c78b17501385be 100644 (file)
@@ -245,11 +245,11 @@ struct ContentFeatures
        
        void setTexture(u16 i, std::string name);
 
-       void setAllTextures(std::string name, u8 alpha=255)
+       void setAllTextures(std::string name, u8 alpha_=255)
        {
                for(u16 i=0; i<6; i++)
                        setTexture(i, name);
-               alpha = alpha;
+               alpha = alpha_;
                // Force inventory texture too
                setInventoryTexture(name);
        }