]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/nodedef.cpp
Fix trees growing into any type of node
[dragonfireclient.git] / src / nodedef.cpp
index e38061e30d1b9231b6a850235db91b6ef400e9ad..180219ba854f1c0dd8a17b732d74994c4958666c 100644 (file)
@@ -203,6 +203,7 @@ void ContentFeatures::reset()
        liquid_alternative_flowing = "";
        liquid_alternative_source = "";
        liquid_viscosity = 0;
+       liquid_renewable = true;
        light_source = 0;
        damage_per_second = 0;
        node_box = NodeBox();
@@ -262,6 +263,9 @@ void ContentFeatures::serialize(std::ostream &os)
        serializeSimpleSoundSpec(sound_footstep, os);
        serializeSimpleSoundSpec(sound_dig, os);
        serializeSimpleSoundSpec(sound_dug, os);
+       // Stuff below should be moved to correct place in a version that otherwise changes
+       // the protocol version
+       writeU8(os, liquid_renewable);
 }
 
 void ContentFeatures::deSerialize(std::istream &is)
@@ -319,6 +323,9 @@ void ContentFeatures::deSerialize(std::istream &is)
        // If you add anything here, insert it primarily inside the try-catch
        // block to not need to increase the version.
        try{
+               // Stuff below should be moved to correct place in a version that
+               // otherwise changes the protocol version
+               liquid_renewable = readU8(is);
        }catch(SerializationError &e) {};
 }
 
@@ -556,8 +563,6 @@ class CNodeDefManager: public IWritableNodeDefManager
                                        f->solidness = 0;
                                } else {
                                        f->solidness = 1;
-                                       if(f->alpha == 255)
-                                               f->solidness = 2;
                                        f->backface_culling = false;
                                }
                                break;