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.
This commit is contained in:
PsiOmegaDelta
2015-12-16 12:54:34 +01:00
parent abab0067e0
commit f62f24e1ac
2 changed files with 11 additions and 11 deletions

View File

@@ -291,7 +291,7 @@
user.listed_turf = null user.listed_turf = null
else else
user.listed_turf = T user.listed_turf = T
user.client.statpanel = T.name user.client.statpanel = "Turf"
return return
/mob/proc/TurfAdjacent(var/turf/T) /mob/proc/TurfAdjacent(var/turf/T)

View File

@@ -658,7 +658,8 @@
if(!TurfAdjacent(listed_turf)) if(!TurfAdjacent(listed_turf))
listed_turf = null listed_turf = null
else else
statpanel(listed_turf.name, null, listed_turf) if(statpanel("Turf"))
stat("\icon[listed_turf]", listed_turf.name)
for(var/atom/A in listed_turf) for(var/atom/A in listed_turf)
if(!A.mouse_opacity) if(!A.mouse_opacity)
continue continue
@@ -666,9 +667,8 @@
continue continue
if(is_type_in_list(A, shouldnt_see)) if(is_type_in_list(A, shouldnt_see))
continue continue
statpanel(listed_turf.name, null, A) stat(A)
sleep(4) //Prevent updating the stat panel for the next .4 seconds, prevents clientside latency from updates
// facing verbs // facing verbs
/mob/proc/canface() /mob/proc/canface()