fixes beartraps not allowing unbuckle & nanoui runtime spam (#4934)

Co-authored-by: silicons <no@you.cat>
This commit is contained in:
silicons
2023-01-04 10:27:55 -06:00
committed by GitHub
co-authored by silicons
parent 96154623b3
commit d52d4e39af
2 changed files with 17 additions and 5 deletions
+4 -1
View File
@@ -12,7 +12,10 @@
/mob/observer/dead/nano_default_can_use_topic(var/src_object)
if(can_admin_interact())
return UI_INTERACTIVE // Admins are more equal
if(!client || get_dist(src_object, src) > client.view) // Preventing ghosts from having a million windows open by limiting to objects in range
if(!client)
return UI_CLOSE
// todo: in view range for zooming
if(get_dist(src, src_object) > min(CEILING(client.current_viewport_width / 2, 1), CEILING(client.current_viewport_height / 2, 1)))
return UI_CLOSE
return UI_UPDATE // Ghosts can view updates