From 88d36503722ecdbc246ecf36bdd4d94a0bf684ed Mon Sep 17 00:00:00 2001 From: oranges Date: Sun, 4 Jun 2017 22:34:00 +1200 Subject: [PATCH] Refactor another spawn var (#28027) --- code/modules/mob/living/simple_animal/slime/life.dm | 4 ++-- code/modules/mob/living/simple_animal/slime/slime.dm | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index eaee4a6b622..e60f4f1b791 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -309,11 +309,11 @@ if(Target) --target_patience - if (target_patience <= 0 || SStun || Discipline || attacked || docile) // Tired of chasing or something draws out attention + if (target_patience <= 0 || SStun > world.time || Discipline || attacked || docile) // Tired of chasing or something draws out attention target_patience = 0 Target = null - if(AIproc && SStun) + if(AIproc && SStun > world.time) return var/hungry = 0 // determines if the slime is hungry diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 6eb688d38fb..6c12b6d9841 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -394,11 +394,7 @@ if(buckled) Feedstop(silent=1) //we unbuckle the slime from the mob it latched onto. - spawn(0) - SStun = 1 - sleep(rand(20,60)) - SStun = 0 - + SStun = world.time + rand(20,60) spawn(0) canmove = 0 if(user)