summaryrefslogtreecommitdiffhomepage
path: root/serialize/world-reader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'serialize/world-reader.cpp')
-rw-r--r--serialize/world-reader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/serialize/world-reader.cpp b/serialize/world-reader.cpp
index f5459203..4d27c27f 100644
--- a/serialize/world-reader.cpp
+++ b/serialize/world-reader.cpp
@@ -173,7 +173,12 @@ void reader_state::read_chunks(reader_t& s)
else
sc.frame.frame << s;
if (sc.frame.active)
- sc.frame.delta << s;
+ {
+ if (PROTO >= 4) [[likely]]
+ sc.frame.delta << s;
+ else
+ sc.frame.delta = (std::uint16_t)Math::clamp(int(s.read<float>() * 65535), 0, 65535);
+ }
}
t.scenery() = sc;
}