From 202ed77aab4fbfcf7c16fb8393eec0c8e6264cc3 Mon Sep 17 00:00:00 2001 From: Kano <89972582+kano-dot@users.noreply.github.com> Date: Sun, 17 Aug 2025 16:21:26 +0300 Subject: [PATCH] Fixes mobs ignoring their speed value (#21203) ## About PR the `delay` value in use here gets assigned with mob's `speed` var (I am positive on this, though movement code is a relic I can't fully comprehend). If the mob calling this proc had an initial delay value, this check used to ignore it and assigned a fix number. This PR makes it so if `speed` is null or 0, then they're assigned with the fix number. --- code/controllers/subsystems/movement/movement_types.dm | 5 ++--- html/changelogs/kano-dot-speed-fix.yml | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/kano-dot-speed-fix.yml diff --git a/code/controllers/subsystems/movement/movement_types.dm b/code/controllers/subsystems/movement/movement_types.dm index f3d6dca6943..4a13981f772 100644 --- a/code/controllers/subsystems/movement/movement_types.dm +++ b/code/controllers/subsystems/movement/movement_types.dm @@ -44,9 +44,8 @@ // Handle issue of delay 0 being passed for simplemobs. if(istype(moving, /mob/living/simple_animal)) var/mob/living/simple_animal/moving_sa = moving - if(!delay && moving_sa.seek_speed) - delay = moving_sa.seek_speed - else + if(!moving_sa.speed) + moving_sa.speed = 5 delay = 5 src.delay = max(delay, world.tick_lag) //Please... src.lifetime = timeout diff --git a/html/changelogs/kano-dot-speed-fix.yml b/html/changelogs/kano-dot-speed-fix.yml new file mode 100644 index 00000000000..f5c83ebb94b --- /dev/null +++ b/html/changelogs/kano-dot-speed-fix.yml @@ -0,0 +1,6 @@ +author: Kano + +delete-after: True + +changes: + - bugfix: "Fixed mobs ignoring their speed value."