From c9c35afd821f93ec3188e86f25276ba5a80dfa37 Mon Sep 17 00:00:00 2001 From: Mikhail Dzianishchyts Date: Mon, 18 Mar 2024 16:43:41 +0300 Subject: [PATCH] Fix falling into chasm on map load --- code/modules/mob/living/simple_animal/!simple_animal.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/!simple_animal.dm b/code/modules/mob/living/simple_animal/!simple_animal.dm index 58147a598f19..d7e94514dc26 100644 --- a/code/modules/mob/living/simple_animal/!simple_animal.dm +++ b/code/modules/mob/living/simple_animal/!simple_animal.dm @@ -638,7 +638,8 @@ /mob/living/simple_animal/onTransitZ(old_z, new_z) ..() if(AIStatus == AI_Z_OFF) - SSidlenpcpool.idle_mobs_by_zlevel[old_z] -= src + var/list/idle_mobs_on_old_z = LAZYACCESS(SSidlenpcpool.idle_mobs_by_zlevel, old_z) + LAZYREMOVE(idle_mobs_on_old_z, src) toggle_ai(initial(AIStatus)) /mob/living/simple_animal/proc/add_collar(obj/item/petcollar/P, mob/user)