From 26d2811bdff5023b4164735f2ff53627efd1f34d 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 b5c10ea15a..9d526641b6 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -45,8 +45,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()