diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/core/StarDataStream.cpp | 2 | ||||
-rw-r--r-- | source/core/StarNetCompatibility.cpp | 2 | ||||
-rw-r--r-- | source/game/StarNetPackets.cpp | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/source/core/StarDataStream.cpp b/source/core/StarDataStream.cpp index 2688123..13bd2c0 100644 --- a/source/core/StarDataStream.cpp +++ b/source/core/StarDataStream.cpp @@ -6,7 +6,7 @@ namespace Star { -unsigned const CurrentStreamVersion = 6; // update OpenProtocolVersion too! +unsigned const CurrentStreamVersion = 7; // update OpenProtocolVersion too! DataStream::DataStream() : m_byteOrder(ByteOrder::BigEndian), diff --git a/source/core/StarNetCompatibility.cpp b/source/core/StarNetCompatibility.cpp index 220e31e..37eef95 100644 --- a/source/core/StarNetCompatibility.cpp +++ b/source/core/StarNetCompatibility.cpp @@ -2,6 +2,6 @@ namespace Star { -VersionNumber const OpenProtocolVersion = 6; // update StreamCompatibilityVersion too! +VersionNumber const OpenProtocolVersion = 7; // update StreamCompatibilityVersion too! }
\ No newline at end of file diff --git a/source/game/StarNetPackets.cpp b/source/game/StarNetPackets.cpp index a121beb..953743c 100644 --- a/source/game/StarNetPackets.cpp +++ b/source/game/StarNetPackets.cpp @@ -764,13 +764,17 @@ ReplaceTileListPacket::ReplaceTileListPacket(TileModificationList modifications, void ReplaceTileListPacket::read(DataStream& ds) { ds.readContainer(modifications); ds.read(tileDamage); - ds.read(applyDamage); + if (ds.streamCompatibilityVersion() >= 7) + ds.read(applyDamage); + else + applyDamage = false; } void ReplaceTileListPacket::write(DataStream& ds) const { ds.writeContainer(modifications); ds.write(tileDamage); - ds.write(applyDamage); + if (ds.streamCompatibilityVersion() >= 7) + ds.write(applyDamage); } DamageTileGroupPacket::DamageTileGroupPacket() : layer(TileLayer::Foreground) {} |