diff --git a/code/modules/mob/living/simple_animal/hostile/hivebot.dm b/code/modules/mob/living/simple_animal/hostile/hivebot.dm index 6ed4c047adf..c5300971393 100644 --- a/code/modules/mob/living/simple_animal/hostile/hivebot.dm +++ b/code/modules/mob/living/simple_animal/hostile/hivebot.dm @@ -75,6 +75,7 @@ icon_state = "hivebotbomber" attacktext = "bumped" move_to_delay = 8 + var/has_exploded = FALSE /mob/living/simple_animal/hostile/hivebot/bomber/AttackingTarget() ..() @@ -82,19 +83,22 @@ stance = HOSTILE_STANCE_TIRED stop_automated_movement = 1 wander = 0 - - playsound(src.loc, 'sound/items/countdown.ogg', 125, 1) - spawn(20) - fragem(src,10,30,2,3,5,1,0) - src.gib() + if(!has_exploded) + playsound(src.loc, 'sound/items/countdown.ogg', 125, 1) + has_exploded = TRUE + addtimer(CALLBACK(src, .proc/burst), 20) /mob/living/simple_animal/hostile/hivebot/bomber/bullet_act(var/obj/item/projectile/Proj) if(istype(Proj, /obj/item/projectile/bullet/pistol/hivebotspike) || istype(Proj, /obj/item/projectile/beam/hivebot)) Proj.no_attack_log = 1 return PROJECTILE_CONTINUE - else - fragem(src,10,30,2,3,5,1,0) - src.gib() + else if(!has_exploded) + has_exploded = TRUE + burst() + +/mob/living/simple_animal/hostile/hivebot/bomber/proc/burst() + fragem(src,10,30,2,3,5,1,0) + src.gib() /mob/living/simple_animal/hostile/hivebot/range name = "Hivebot" diff --git a/html/changelogs/191103-bugfix_hivebombers.yml b/html/changelogs/191103-bugfix_hivebombers.yml new file mode 100644 index 00000000000..b00d144081f --- /dev/null +++ b/html/changelogs/191103-bugfix_hivebombers.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Ferner + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixed an issue with hivebot bombers that could lead to infinite recursion."