diff options
author | PilzAdam <pilzadam@minetest.net> | 2013-03-23 23:15:30 +0100 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-03-23 23:15:30 +0100 |
commit | ab57fdac44bae20e43500b3edd39bac9a0f563c5 (patch) | |
tree | 60b371b949c678aab8e64aef6be91ce0e49e8c65 | |
parent | dacc8cdb3a0e824b435f9f4d98beb471f7a8be64 (diff) | |
download | minetest-ab57fdac44bae20e43500b3edd39bac9a0f563c5.tar.gz minetest-ab57fdac44bae20e43500b3edd39bac9a0f563c5.tar.bz2 minetest-ab57fdac44bae20e43500b3edd39bac9a0f563c5.zip |
Move rightclickable to the proper place
-rw-r--r-- | src/clientserver.h | 1 | ||||
-rw-r--r-- | src/nodedef.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/clientserver.h b/src/clientserver.h index 3292d1e9e..6d830b92b 100644 --- a/src/clientserver.h +++ b/src/clientserver.h @@ -81,6 +81,7 @@ SharedBuffer<u8> makePacket_TOCLIENT_TIME_OF_DAY(u16 time, float time_speed); TOCLIENT_SHOW_FORMSPEC PROTOCOL_VERSION 17: Serialization format change: include backface_culling flag in TileDef + Added rightclickable field in nodedef */ #define LATEST_PROTOCOL_VERSION 17 diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 7f6c8a054..d41df5c3b 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -275,9 +275,9 @@ void ContentFeatures::serialize(std::ostream &os, u16 protocol_version) serializeSimpleSoundSpec(sound_footstep, os); serializeSimpleSoundSpec(sound_dig, os); serializeSimpleSoundSpec(sound_dug, os); + writeU8(os, rightclickable); // 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) @@ -336,12 +336,12 @@ void ContentFeatures::deSerialize(std::istream &is) deSerializeSimpleSoundSpec(sound_footstep, is); deSerializeSimpleSoundSpec(sound_dig, is); deSerializeSimpleSoundSpec(sound_dug, is); + rightclickable = readU8(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 - rightclickable = readU8(is); }catch(SerializationError &e) {}; } |