Wire up client mobs to the spatial grid (#31330)

* Add client mobs to the spatial grid

* reviews

* apparently having a mob is not guaranteed
This commit is contained in:
Toastical
2026-01-10 20:20:36 +00:00
committed by GitHub
parent 7787a26328
commit 2df60ba208
6 changed files with 67 additions and 1 deletions
+13 -1
View File
@@ -1491,6 +1491,19 @@ GLOBAL_LIST_INIT(holy_areas, typecacheof(list(
if(.)
set_typing_indicator(FALSE)
/// Cleanup proc that's called when a mob loses a client, either through client destroy or logout
/// Logout happens post client del, so we can't just copypaste this there. This keeps things clean and consistent
/mob/proc/become_uncliented()
if(!canon_client)
return
if(canon_client?.movingmob)
LAZYREMOVE(canon_client.movingmob.client_mobs_in_contents, src)
canon_client.movingmob = null
clear_important_client_contents()
canon_client = null
///Makes a call in the context of a different usr. Use sparingly
/world/proc/invoke_callback_with_usr(mob/user_mob, datum/callback/invoked_callback, ...)
var/temp = usr
@@ -1656,4 +1669,3 @@ GLOBAL_LIST_INIT(holy_areas, typecacheof(list(
. *= 0.5
if(5 to 6)
return 0