diff options
author | proller <proller@github.com> | 2013-07-13 21:48:14 +0400 |
---|---|---|
committer | proller <proller@github.com> | 2013-07-13 22:13:24 +0400 |
commit | 9733dd5b5e5516e18775665db132b2446492716c (patch) | |
tree | cb665ab99ebab101c563076a9e31a94a2ce293d4 /src/nodedef.cpp | |
parent | a70993d6d20b4668556a8792ecd952d84a7e6939 (diff) | |
download | minetest-9733dd5b5e5516e18775665db132b2446492716c.tar.gz minetest-9733dd5b5e5516e18775665db132b2446492716c.tar.bz2 minetest-9733dd5b5e5516e18775665db132b2446492716c.zip |
Leveled nodebox
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r-- | src/nodedef.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 13e7e9958..4b2fe1643 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -50,7 +50,7 @@ void NodeBox::serialize(std::ostream &os) const writeU8(os, 1); // version writeU8(os, type); - if(type == NODEBOX_FIXED) + if(type == NODEBOX_FIXED || type == NODEBOX_LEVELED) { writeU16(os, fixed.size()); for(std::vector<aabb3f>::const_iterator @@ -82,7 +82,7 @@ void NodeBox::deSerialize(std::istream &is) type = (enum NodeBoxType)readU8(is); - if(type == NODEBOX_FIXED) + if(type == NODEBOX_FIXED || type == NODEBOX_LEVELED) { u16 fixed_count = readU16(is); while(fixed_count--) @@ -206,6 +206,7 @@ void ContentFeatures::reset() climbable = false; buildable_to = false; rightclickable = true; + leveled = 0; liquid_type = LIQUID_NONE; liquid_alternative_flowing = ""; liquid_alternative_source = ""; @@ -281,6 +282,7 @@ void ContentFeatures::serialize(std::ostream &os, u16 protocol_version) // Stuff below should be moved to correct place in a version that otherwise changes // the protocol version writeU8(os, drowning); + writeU8(os, leveled); } void ContentFeatures::deSerialize(std::istream &is) @@ -346,6 +348,7 @@ void ContentFeatures::deSerialize(std::istream &is) // Stuff below should be moved to correct place in a version that // otherwise changes the protocol version drowning = readU8(is); + leveled = readU8(is); }catch(SerializationError &e) {}; } |