From 8d5bb4d126a898c1da7fad47df53002dfb143b13 Mon Sep 17 00:00:00 2001 From: Pieter Vlasblom Date: Mon, 5 Oct 2015 03:33:38 +0200 Subject: [PATCH] 8 reasons frying a cpu will change the way you think about everything. --- code/modules/client/client procs.dm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 70db67c27c5..06352c11ba5 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -175,7 +175,7 @@ var/next_external_rsc = 0 src.changes() else winset(src, "rpane.changelogb", "background-color=#eaeaea;font-style=bold") - + if (ckey in clientmessages) for (var/message in clientmessages[ckey]) src << message @@ -187,7 +187,7 @@ var/next_external_rsc = 0 ////////////// //DISCONNECT// ////////////// - + /client/Del() if(holder) adminGreet(1) @@ -279,6 +279,14 @@ var/next_external_rsc = 0 if(inactivity > duration) return inactivity return 0 +// Byond seemingly calls stat, each tick. +// Calling things each tick can get expensive real quick. +// So we slow this down a little. +// See: http://www.byond.com/docs/ref/info.html#/client/proc/Stat +/client/Stat() + . = ..() + sleep(1) + //send resources to the client. It's here in its own proc so we can move it around easiliy if need be /client/proc/send_resources()