From 908bef94cf701680dd0258826bdb5ea1f29e2316 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 23 Mar 2024 19:13:52 +0100 Subject: a --- src/critter.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/critter.cpp b/src/critter.cpp index ef3fd2a2..843036b4 100644 --- a/src/critter.cpp +++ b/src/critter.cpp @@ -99,7 +99,6 @@ constexpr std::array rotation_to_similar(rotation r) } template -CORRADE_ALWAYS_INLINE bool update_movement_body(size_t& i, critter& C, const anim_def& info) { constexpr auto vec = Vector2{vx, vy}; @@ -130,11 +129,11 @@ bool update_movement_body(size_t& i, critter& C, const anim_def& info) } template -CORRADE_NEVER_INLINE -bool update_movement_2(size_t& index, critter& C, const anim_def& info) +CORRADE_ALWAYS_INLINE +bool update_movement_2(size_t& i, critter& C, const anim_def& info) { constexpr auto vec = rotation_to_vec(r); - return update_movement_body(index, C, info); + return update_movement_body(i, C, info); } template @@ -164,9 +163,8 @@ bool update_movement_1(critter& C, size_t& i, const anim_def& info, uint32_t nfr } else { - constexpr auto vec = rotation_to_vec(new_r); for (auto k = 0u; k < nframes; k++) - if (!update_movement_body(i, C, info)) + if (!update_movement_2(i, C, info)) return false; } -- cgit v1.2.3