diff options
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r-- | src/nodedef.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 36fa798fd..12d9238ad 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -106,7 +106,7 @@ void NodeBox::deSerialize(std::istream &is) /* TileDef */ - + void TileDef::serialize(std::ostream &os) const { writeU8(os, 0); // version @@ -173,7 +173,7 @@ void ContentFeatures::reset() has_after_destruct = false; /* Actual data - + NOTE: Most of this is always overridden by the default values given in builtin.lua */ @@ -199,6 +199,7 @@ void ContentFeatures::reset() diggable = true; climbable = false; buildable_to = false; + rightclickable = true; liquid_type = LIQUID_NONE; liquid_alternative_flowing = ""; liquid_alternative_source = ""; @@ -271,6 +272,7 @@ void ContentFeatures::serialize(std::ostream &os, u16 protocol_version) serializeSimpleSoundSpec(sound_dug, os); // Stuff below should be moved to correct place in a version that otherwise changes // the protocol version + writeU8(os, rightclickable); } void ContentFeatures::deSerialize(std::istream &is) @@ -334,6 +336,7 @@ void ContentFeatures::deSerialize(std::istream &is) try{ // Stuff below should be moved to correct place in a version that // otherwise changes the protocol version + rightclickable = readU8(is); }catch(SerializationError &e) {}; } @@ -354,7 +357,7 @@ public: ContentFeatures &f = m_content_features[i]; f.reset(); // Reset to defaults } - + // Set CONTENT_AIR { ContentFeatures f; @@ -541,11 +544,11 @@ public: bool new_style_water = g_settings->getBool("new_style_water"); bool new_style_leaves = g_settings->getBool("new_style_leaves"); bool opaque_water = g_settings->getBool("opaque_water"); - + for(u16 i=0; i<=MAX_CONTENT; i++) { ContentFeatures *f = &m_content_features[i]; - + // Figure out the actual tiles to use TileDef tiledef[6]; for(u32 j=0; j<6; j++) @@ -604,9 +607,12 @@ public: } } break; + case NDT_PLANTLIKE: + f->solidness = 0; + f->backface_culling = false; + break; case NDT_TORCHLIKE: case NDT_SIGNLIKE: - case NDT_PLANTLIKE: case NDT_FENCELIKE: case NDT_RAILLIKE: case NDT_NODEBOX: |