Just deleted about 400 bot accounts and a bunch of spam. To mitigate this in the future, we've enabled reCaptcha on signup. Let me know if someone got caught in the crossfire.

Commit 824f1382 authored by Clusterfack's avatar Clusterfack
Browse files

Speed up virtualhearers a bit again

parent d5f77540
......@@ -325,7 +325,7 @@ proc/handle_render(var/mob,var/message,var/speaker)
var/global/resethearers = 0
for(var/mob/virtualhearer/VH in virtualhearers)
for(var/mob/virtualhearer/VH in movable_hearers)
VH.loc = get_turf(VH.attached)
resethearers = world.time + 2
var/global/list/mob/virtualhearer/virtualhearers = list()
var/global/list/mob/virtualhearer/movable_hearers = list()
var/global/list/mob/virtualhearer/mob_hearers = list()
//To improve the performance of the virtualhearers loop, we do not need to
//locate the virtualhearers of these stationary objects, as they should not move
//and if they do move (singuloth), the virtualhearer should be moving with them
......@@ -20,9 +22,6 @@ var/list/stationary_hearers = list( /obj/item/device/radio/intercom,
alpha = 0
animate_movement = 0
ignoreinvert = 1
//This can be expanded with vision flags to make a device to hear through walls for example
var/attached_type = null
var/attached_ref = null
......@@ -34,15 +33,18 @@ var/list/stationary_hearers = list( /obj/item/device/radio/intercom,
sight = M.sight
see_invisible = M.see_invisible
mob_hearers[attachedto] = src
movable_hearers += src
virtualhearers += src
/* An equally nonsense and good idea, keep stationary hearers from moving, but without a second list
track virtualhearers how are you going to REMOVE virtualhearers
virtualhearers -= src
virtualhearers -= src
movable_hearers -= src
mob_hearers -= attached
attached = null
......@@ -78,6 +80,5 @@ track virtualhearers how are you going to REMOVE virtualhearers
sight &= ~removing
if(sight != oldsight)
for(var/mob/virtualhearer/VH in virtualhearers)
if(VH.attached == src)
VH.sight = sight
\ No newline at end of file
var/mob/virtualhearer/VH = mob_hearers[src]
VH.sight = sight
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment