summaryrefslogtreecommitdiffhomepage
path: root/src/critter.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-01 11:35:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-01 11:35:35 +0100
commit558a7fa472a18cb48c5c898931c7b2c6fb988376 (patch)
treeecbcc6ac375adeebbf4507b0002b6bfa4d2fc59c /src/critter.cpp
parent324683f6e9c6898783ac19795a9cb69a989bb7af (diff)
src: add scaling factor to allocate_frame_time()
Diffstat (limited to 'src/critter.cpp')
-rw-r--r--src/critter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/critter.cpp b/src/critter.cpp
index fb3d7e52..491d8566 100644
--- a/src/critter.cpp
+++ b/src/critter.cpp
@@ -176,7 +176,7 @@ void critter::update_movement(size_t i, Ns dt, rotation new_r)
fm_assert(new_r < rotation_COUNT);
fm_assert(is_dynamic());
- auto nframes = allocate_frame_time(dt * speed);
+ auto nframes = allocate_frame_time(dt, speed);
if (nframes == 0)
{
static unsigned foo;
@@ -242,6 +242,7 @@ critter::critter(object_id id, class chunk& c, const critter_proto& proto) :
if (!name)
name = "(Unnamed)"_s;
fm_soft_assert(atlas->check_rotation(r));
+ fm_soft_assert(speed >= 0);
object::set_bbox_(offset, bbox_offset, Vector2ub(iTILE_SIZE2/2), pass);
}