Skip calling handle_ambience() if there is no client assigned

Fixes potential CPU usage issue for EVERY single mob having that call
This commit is contained in:
Rykka
2020-08-04 16:13:38 -04:00
parent 92ea262ec5
commit 26d2811bdf
+2 -2
View File
@@ -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()