From a8668cce009fbc4edd36c8fffe63970042531f4b Mon Sep 17 00:00:00 2001 From: Adrer Date: Thu, 19 Sep 2024 15:17:23 +0200 Subject: [PATCH] [FIX] Dead cats no longer chase mice (#26826) * Dead cats no longer follow mice * Also stop chasing if the mouse is already dead * No reason for these to not just be walk * Update code/modules/mob/living/simple_animal/friendly/cat.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: Adrer * Update code/modules/mob/living/simple_animal/friendly/cat.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Adrer --------- Signed-off-by: Adrer Co-authored-by: adrermail@gmail.com Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/modules/mob/living/simple_animal/friendly/cat.dm | 6 ++++-- code/modules/mob/living/simple_animal/simple_animal.dm | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 44e762865d57..7d620baf3e70 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -142,6 +142,7 @@ M.death() M.splat() movement_target = null + walk(src, 0) stop_automated_movement = FALSE break for(var/obj/item/toy/cattoy/T in view(1, src)) @@ -156,7 +157,7 @@ turns_since_scan++ if(turns_since_scan > 5) - walk_to(src,0) + walk(src, 0) turns_since_scan = 0 if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc))) movement_target = null @@ -164,13 +165,14 @@ if(!movement_target || !(movement_target.loc in oview(src, 3))) movement_target = null stop_automated_movement = FALSE + walk(src, 0) for(var/mob/living/simple_animal/mouse/snack in oview(src,3)) if(isturf(snack.loc) && !snack.stat) movement_target = snack break if(movement_target) stop_automated_movement = TRUE - walk_to(src,movement_target,0,3) + walk(src, movement_target, 0, 3) /mob/living/simple_animal/pet/cat/Proc name = "Proc" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 6ac0309330a4..b819db355e02 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -365,6 +365,7 @@ if(!.) return FALSE flying = FALSE + walk(src, 0) if(nest) nest.spawned_mobs -= src nest = null