From 5344b970690f93df58b984b0c9e615002e0f815c Mon Sep 17 00:00:00 2001 From: Rykka Date: Tue, 4 Aug 2020 16:11:17 -0400 Subject: [PATCH] Skip calling handle_ambience() if there is no client assigned Fixes potential CPU usage issue for EVERY single mob having that call --- code/modules/mob/living/life.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index a74a4a22b30..bf3d898b6c7 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -46,8 +46,8 @@ //Check if we're on fire handle_fire() - // Handle re-running ambience to mobs if they've remained in an area. - handle_ambience() + if(client) // Handle re-running ambience to mobs if they've remained in an area, AND have an active client assigned to them. + handle_ambience() //stuff in the stomach //handle_stomach() //VOREStation Code