diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2017-08-29 19:26:55 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-29 19:26:55 +0200 |
commit | b7ee608e70f8e031e3e01c9672bedb16efa648b8 (patch) | |
tree | d4aa75bc30fa45cb3ec024e92aeff3e605cc8cc0 /src/tileanimation.cpp | |
parent | 1b3e4e173624bb2523d4386aeef6987709d9b022 (diff) | |
download | hax-minetest-server-b7ee608e70f8e031e3e01c9672bedb16efa648b8.tar.gz hax-minetest-server-b7ee608e70f8e031e3e01c9672bedb16efa648b8.zip |
Bump minimal protocol version to 36 (#6319)
* Bump minimal protocol version to 36
Item/Node/TileDef, NodeBox, TileAnimation: Remove old compat code
* Accept future serialisation versions
Diffstat (limited to 'src/tileanimation.cpp')
-rw-r--r-- | src/tileanimation.cpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/tileanimation.cpp b/src/tileanimation.cpp index 67d27d396..eaef7f8cb 100644 --- a/src/tileanimation.cpp +++ b/src/tileanimation.cpp @@ -19,23 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "tileanimation.h" #include "util/serialize.h" -void TileAnimationParams::serialize(std::ostream &os, u16 protocol_version) const +void TileAnimationParams::serialize(std::ostream &os, u8 tiledef_version) const { - if (protocol_version < 29) { - if (type == TAT_VERTICAL_FRAMES) { - writeU8(os, type); - writeU16(os, vertical_frames.aspect_w); - writeU16(os, vertical_frames.aspect_h); - writeF1000(os, vertical_frames.length); - } else { - writeU8(os, TAT_NONE); - writeU16(os, 1); - writeU16(os, 1); - writeF1000(os, 1.0); - } - return; - } - writeU8(os, type); if (type == TAT_VERTICAL_FRAMES) { writeU16(os, vertical_frames.aspect_w); @@ -48,15 +33,9 @@ void TileAnimationParams::serialize(std::ostream &os, u16 protocol_version) cons } } -void TileAnimationParams::deSerialize(std::istream &is, u16 protocol_version) +void TileAnimationParams::deSerialize(std::istream &is, u8 tiledef_version) { type = (TileAnimationType) readU8(is); - if (protocol_version < 29) { - vertical_frames.aspect_w = readU16(is); - vertical_frames.aspect_h = readU16(is); - vertical_frames.length = readF1000(is); - return; - } if (type == TAT_VERTICAL_FRAMES) { vertical_frames.aspect_w = readU16(is); |