Micro optimization for handle_breathing
This commit is contained in:
@@ -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/))
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user