diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-06 00:53:28 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-06 00:53:28 +0100 |
| commit | 85d11eca681e61767edfdacd84a4e845f6b96cec (patch) | |
| tree | a8448030ffa7478055b4f356e85cbbd93afe68a5 /src/critter.cpp | |
| parent | 152205cffbce23f98cb317d5fc65d1fbb2f6af58 (diff) | |
test/critter: fix the case of: 0 < accel < 1
Diffstat (limited to 'src/critter.cpp')
| -rw-r--r-- | src/critter.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/critter.cpp b/src/critter.cpp index f9de8638..abb80865 100644 --- a/src/critter.cpp +++ b/src/critter.cpp @@ -159,11 +159,7 @@ void critter::update_movement(size_t i, Ns dt, rotation new_r) const auto hz = atlas->info().fps; const auto nframes = alloc_frame_time<uint16_t>(dt, delta, hz, speed); if (nframes == 0) - { - //static unsigned foo; - //Debug{} << ++foo << "stopped"; return; - } const auto rotations = rotation_to_similar(new_r); const unsigned nvecs = (int)new_r & 1 ? 3 : 1; @@ -197,6 +193,7 @@ void critter::update_movement(size_t i, Ns dt, rotation new_r) } else { + can_move = true; offset_frac = Vector2us(Math::abs(Math::min({1.f,1.f}, offset_)) * frac); break; } |
