* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
29 lines
810 B
Plaintext
29 lines
810 B
Plaintext
#define PING_BUFFER_TIME 25
|
|
|
|
SUBSYSTEM_DEF(ping)
|
|
name = "Ping"
|
|
wait = 6
|
|
flags = SS_NO_INIT|SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
|
|
priority = 10
|
|
var/list/currentrun
|
|
|
|
/datum/controller/subsystem/ping/fire(resumed = FALSE)
|
|
if (!resumed)
|
|
src.currentrun = GLOB.clients.Copy()
|
|
|
|
var/list/currentrun = src.currentrun
|
|
while (length(currentrun))
|
|
var/client/C = currentrun[currentrun.len]
|
|
currentrun.len--
|
|
if (!C || world.time - C.connection_time < PING_BUFFER_TIME || C.inactivity >= (wait-1))
|
|
if (MC_TICK_CHECK)
|
|
return
|
|
continue
|
|
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*world.tick_usage/100]")
|
|
if (MC_TICK_CHECK) //one day, when ss13 has 1000 people per server, you guys are gonna be glad I added this tick check
|
|
return
|
|
|
|
currentrun = null
|
|
|
|
#undef PING_BUFFER_TIME
|