From 1c1cbe8e5bd8e90e22da95c26c17f34c605448c9 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 4 Jun 2017 11:04:56 -0500 Subject: [PATCH] Refactor another spawn var (#1395) --- 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 eaee4a6b62..e60f4f1b79 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 6eb688d38f..6c12b6d984 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)