diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-06 19:29:19 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-06 19:29:19 +0200 |
commit | ee5d38b3d5b994425776ca9fe19ce0bdc8f70c8f (patch) | |
tree | 9192f51145292951c15c258b1464532fdea7efea /test | |
parent | 683b6838786b28ee3398ae9580cfaa8e003f084f (diff) |
bring back update_world resync on entity moved
Diffstat (limited to 'test')
-rw-r--r-- | test/serializer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<scenery>(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); } |