Skip to content

Commit

Permalink
fix mobs getting nulled
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Sep 18, 2024
1 parent c4b0e5e commit 9e7d084
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@
return

var/virt_z = virtual_z()
if(!virt_z)
return
var/players_on_virtual_z = LAZYACCESS(SSmobs.players_by_virtual_z, "[virt_z]")
var/players_on_virtual_z = 0
if(virt_z)
players_on_virtual_z = LAZYACCESS(SSmobs.players_by_virtual_z, "[virt_z]")
if(!length(players_on_virtual_z))
toggle_ai(AI_Z_OFF)
else if(AIStatus == AI_Z_OFF)
Expand Down

0 comments on commit 9e7d084

Please sign in to comment.