From ee5d38b3d5b994425776ca9fe19ce0bdc8f70c8f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 6 Apr 2024 19:29:19 +0200 Subject: bring back update_world resync on entity moved --- test/serializer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/serializer.cpp b/test/serializer.cpp index 5179342c..86105d3b 100644 --- a/test/serializer.cpp +++ b/test/serializer.cpp @@ -51,7 +51,6 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) { auto& e = *w.make_object(w.make_id(), {ch, {K+3, K+1}}, door); - const auto index = e.index(); const auto end = e.atlas->info().nframes-1; constexpr auto dt = Second / 60; fm_assert(e.frame == end); @@ -59,10 +58,10 @@ chunk& test_app::make_test_chunk(world& w, chunk_coords_ ch) fm_assert(!x.active); e.activate(e.index()); fm_assert(x.active); - e.update(index, dt); + { auto index = e.index(); e.update(index, dt); } fm_assert(e.frame != end); for (int i = 0; i < 60*3; i++) - e.update(index, dt); + { auto index = e.index(); e.update(index, dt); } fm_assert(e.frame == 0); fm_assert(!x.active); } -- cgit v1.2.3