From 717b191fe2fe5c6d0c5cf8aa307f8a148e318db6 Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Tue, 2 Jun 2015 18:30:13 +0930 Subject: [PATCH] Minor refactor to reduce calls to handle_actions(). --- code/modules/mob/living/carbon/alien/life.dm | 1 - code/modules/mob/living/carbon/brain/life.dm | 1 - code/modules/mob/living/carbon/human/life.dm | 1 - code/modules/mob/living/carbon/metroid/life.dm | 1 - code/modules/mob/living/living.dm | 9 +++++++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index de6541128e..13bc1a4686 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -27,7 +27,6 @@ //Status updates, death etc. handle_regular_status_updates() - handle_actions() update_canmove() update_icons() diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 7f25d287bd..189dfd81e7 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -27,7 +27,6 @@ //Status updates, death etc. handle_regular_status_updates() update_canmove() - handle_actions() if(client) handle_regular_hud_updates() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index a93867ebd1..e1abecc16b 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -117,7 +117,6 @@ //Status updates, death etc. handle_regular_status_updates() //Optimized a bit - handle_actions() update_canmove() //Update our name based on whether our face is obscured/disfigured diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index 029b49faab..b41fdb758a 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -28,7 +28,6 @@ handle_environment(environment) // Handle temperature/pressure differences between body and environment handle_regular_status_updates() // Status updates, death etc. - handle_actions() /mob/living/carbon/slime/proc/handle_environment(datum/gas_mixture/environment) if(!environment) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3097d90659..b2ff53ba90 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,3 +1,8 @@ +/mob/living/Life() + ..() + if(stat != DEAD) + handle_actions() + //mob verbs are faster than object verbs. See mob/verb/examine. /mob/living/verb/pulled(atom/movable/AM as mob|obj in oview(1)) set name = "Pull" @@ -609,7 +614,7 @@ default behaviour is: /mob/living/proc/escape_inventory(obj/item/weapon/holder/H) if(H != src.loc) return - + var/mob/M = H.loc //Get our mob holder (if any). if(istype(M)) @@ -794,5 +799,5 @@ default behaviour is: inertia_dir = 2 src << "