Merge pull request #13779 from Terilia/heacrabcyclefixing

Headcrab Cycle Fix
This commit is contained in:
Fox McCloud
2020-07-14 10:00:53 -04:00
committed by GitHub
@@ -31,8 +31,7 @@
if(H.stat == DEAD || (!H.check_death_method() && H.health <= HEALTH_THRESHOLD_DEAD))
Zombify(H)
break
var/cycles = 4
if(cycles >= 4)
if(times_fired % 4 == 0)
for(var/mob/living/simple_animal/K in oview(src, 1)) //Only for corpse right next to/on same tile
if(K.stat == DEAD || (!K.check_death_method() && K.health <= HEALTH_THRESHOLD_DEAD))
visible_message("<span class='danger'>[src] consumes [K] whole!</span>")
@@ -40,8 +39,6 @@
health += 10
qdel(K)
break
cycles = 0
cycles++
/mob/living/simple_animal/hostile/headcrab/OpenFire(atom/A)
if(check_friendly_fire)
@@ -93,7 +90,6 @@
if(is_zombie)
qdel(src)
/mob/living/simple_animal/hostile/headcrab/handle_automated_speech() // This way they have different screams when attacking, sometimes. Might be seen as sphagetthi code though.
if(speak_chance)
if(rand(0,200) < speak_chance)
@@ -106,7 +102,6 @@
M.loc = get_turf(src)
return ..()
/mob/living/simple_animal/hostile/headcrab/update_icons()
. = ..()
if(is_zombie)