summaryrefslogtreecommitdiffhomepage
path: root/test/critter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/critter.cpp')
-rw-r--r--test/critter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/critter.cpp b/test/critter.cpp
index e75be7d9..3f13a87f 100644
--- a/test/critter.cpp
+++ b/test/critter.cpp
@@ -112,6 +112,7 @@ bool run(world& w, const function_view<Ns() const>& make_dt,
Ns time{0};
auto last_pos = npc.position();
+ auto last_delta = npc.delta;
uint32_t i;
if (!start.quiet) [[unlikely]]
@@ -140,8 +141,9 @@ bool run(world& w, const function_view<Ns() const>& make_dt,
fm_assert(dt <= Second * 1000);
npc.update_movement(index, dt, start.rotation);
const auto pos = npc.position();
- const bool same_pos = pos == last_pos;
+ const bool same_pos = pos == last_pos && npc.delta == last_delta;
last_pos = pos;
+ last_delta = npc.delta;
time += dt;
@@ -300,7 +302,7 @@ void test_app::test_critter()
test1("dt=100 accel=2", constantly(Millisecond * 100.0 ), 2);
// test1("dt=16.667 accel=0.5", constantly(Millisecond * 16.667),0.5); // todo! fix this!
test1("dt=100 accel=0.5", constantly(Millisecond * 100.0 ), 0.5);
- //test1("dt=16.667 ms accel=1", constantly(Millisecond * 16.667), 1); // todo! fix this!
+ test1("dt=16.667 ms accel=1", constantly(Millisecond * 16.667), 1); // todo! fix this!
test2("dt=33.334 accel=1", constantly(Millisecond * 33.334), 1);
test2("dt=33.334 accel=2", constantly(Millisecond * 33.334), 2);
test2("dt=33.334 accel=5", constantly(Millisecond * 33.334), 5);