summaryrefslogtreecommitdiffhomepage
path: root/serialize/world-reader.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-03-18 15:19:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-03-18 15:31:06 +0100
commitd4ae141eee51825fccf2350a6d8b906f24d57a95 (patch)
treed9854dc3beb23f370455aa4e2c7bdac086ca3ed0 /serialize/world-reader.cpp
parent8104af61d21dc48fc163ca5c1124a9e4c5911fdc (diff)
serialize/save: store entity counter right before chunks
Diffstat (limited to 'serialize/world-reader.cpp')
-rw-r--r--serialize/world-reader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/serialize/world-reader.cpp b/serialize/world-reader.cpp
index 84958109..dc698765 100644
--- a/serialize/world-reader.cpp
+++ b/serialize/world-reader.cpp
@@ -307,11 +307,11 @@ void reader_state::deserialize_world(ArrayView<const char> buf)
(std::size_t)proto, (std::size_t)min_proto_version, (std::size_t)proto_version);
PROTO = proto;
std::uint64_t entity_counter = 0;
- if (PROTO >= 8) [[likely]]
- entity_counter << s;
read_atlases(s);
if (PROTO >= 3) [[likely]]
read_sceneries(s);
+ if (PROTO >= 8) [[likely]]
+ entity_counter << s;
read_chunks(s);
s.assert_end();
if (PROTO >= 8) [[likely]]