Skip to content

Commit

Permalink
[FIX] Dead cats no longer chase mice (ParadiseSS13#26826)
Browse files Browse the repository at this point in the history
* 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 <erwin@lombok.demon.nl>

* Update code/modules/mob/living/simple_animal/friendly/cat.dm

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: Adrer <erwin@lombok.demon.nl>

---------

Signed-off-by: Adrer <erwin@lombok.demon.nl>
Co-authored-by: adrermail@gmail.com <adrermail@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 19, 2024
1 parent cca2b52 commit a8668cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/modules/mob/living/simple_animal/friendly/cat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -156,21 +157,22 @@

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
stop_automated_movement = FALSE
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"
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@
if(!.)
return FALSE
flying = FALSE
walk(src, 0)
if(nest)
nest.spawned_mobs -= src
nest = null
Expand Down

0 comments on commit a8668cc

Please sign in to comment.