[READY] playsound performance (#40045)

tl;dr: we have lists of playermobs on the z-level, which generally have fewer player mobs to iterate through. If we use them, we can get rid of the z-level checks too. On the off-chance that something plays a sound in nullspace, we can skip pretty much everything. The client-check can go too, there are no playermobs without a client.
This commit is contained in:
vuonojenmustaturska
2018-09-08 13:27:01 +12:00
committed by oranges
parent 3585ff1560
commit f2ed477232
8 changed files with 53 additions and 14 deletions
+2 -3
View File
@@ -66,9 +66,8 @@
if(src.mob)
var/mob/A = src.mob
A.x = tx
A.y = ty
A.z = tz
var/turf/T = locate(tx,ty,tz)
A.forceMove(T)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Coordiate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")