mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Images from security and medical HUDs (glasses/borg/odysseus) will now be garbage collected instead of being manually deleted.
Because of this, borgs will no longer save all the images on their client, avoiding the display of thousands of HUD images on a single mob, lagging or crashing the player's client. If I'm right, this will reduce 90% of the del() lag. Cross your fingers! git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5773 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -932,7 +932,7 @@
|
||||
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
del(hud)
|
||||
client.images.Remove(hud)
|
||||
|
||||
client.screen.Remove(global_hud.blurry, global_hud.druggy, global_hud.vimpaired, global_hud.darkMask)
|
||||
|
||||
|
||||
@@ -161,6 +161,10 @@
|
||||
src.see_in_dark = 8
|
||||
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
for(var/image/hud in client.images)
|
||||
if(copytext(hud.icon_state,1,4) == "hud") //ugly, but icon comparison is worse, I believe
|
||||
client.images.Remove(hud)
|
||||
|
||||
var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
|
||||
if(hud && hud.hud) hud.hud.process_hud(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user