From f62f24e1aca78cb82f46ef5adcfc300dae4cd373 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 16 Dec 2015 12:54:34 +0100 Subject: [PATCH] Removes Stat() sleep. Fixes a Stat() runtime that occasionally occur if the client was logged out when the sleep() was done sleeping. Fixes delays when using alt+Turf click. Makes the alt+Turf click panel only update when viewed instead. Seems like the better performance fix option in general. Makes the alt+Turf click panel always use the "Turf" name, consistency. --- code/_onclick/click.dm | 2 +- code/modules/mob/mob.dm | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 56af5949f73..3d7622a7133 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -291,7 +291,7 @@ user.listed_turf = null else user.listed_turf = T - user.client.statpanel = T.name + user.client.statpanel = "Turf" return /mob/proc/TurfAdjacent(var/turf/T) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a81c9435035..b42b2c9f722 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -658,17 +658,17 @@ if(!TurfAdjacent(listed_turf)) listed_turf = null else - statpanel(listed_turf.name, null, listed_turf) - for(var/atom/A in listed_turf) - if(!A.mouse_opacity) - continue - if(A.invisibility > see_invisible) - continue - if(is_type_in_list(A, shouldnt_see)) - continue - statpanel(listed_turf.name, null, A) + if(statpanel("Turf")) + stat("\icon[listed_turf]", listed_turf.name) + for(var/atom/A in listed_turf) + if(!A.mouse_opacity) + continue + if(A.invisibility > see_invisible) + continue + if(is_type_in_list(A, shouldnt_see)) + continue + stat(A) - sleep(4) //Prevent updating the stat panel for the next .4 seconds, prevents clientside latency from updates // facing verbs /mob/proc/canface()