diff --git a/code/controllers/subsystem/mobs.dm b/code/controllers/subsystem/mobs.dm index 44cd2e33b3..d9b78a77ad 100644 --- a/code/controllers/subsystem/mobs.dm +++ b/code/controllers/subsystem/mobs.dm @@ -17,12 +17,12 @@ SUBSYSTEM_DEF(mobs) //cache for sanic speed (lists are references anyways) var/list/currentrun = src.currentrun - + var/times_fired = src.times_fired while(currentrun.len) var/mob/M = currentrun[currentrun.len] currentrun.len-- if(M) - M.Life(seconds) + M.Life(seconds, times_fired) else GLOB.mob_list.Remove(M) if (MC_TICK_CHECK) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 6d3f26c244..373107edf3 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -28,8 +28,8 @@ /////////////// //Start of a breath chain, calls breathe() -/mob/living/carbon/handle_breathing() - if(SSmobs.times_fired%4==2 || failed_last_breath) +/mob/living/carbon/handle_breathing(times_fired) + if((times_fired % 4) == 2 || failed_last_breath) breathe() //Breathe per 4 ticks, unless suffocating else if(istype(loc, /obj/)) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 9bfc9129f9..1ab7177b72 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -1,4 +1,4 @@ -/mob/living/Life() +/mob/living/Life(seconds, times_fired) set invisibility = 0 set background = BACKGROUND_ENABLED @@ -20,7 +20,7 @@ if(stat != DEAD) //Breathing, if applicable - handle_breathing() + handle_breathing(times_fired) if(stat != DEAD) //Mutations and radiation handle_mutations_and_radiation() @@ -56,7 +56,7 @@ if(stat != DEAD) return 1 -/mob/living/proc/handle_breathing() +/mob/living/proc/handle_breathing(times_fired) return /mob/living/proc/handle_mutations_and_radiation()