mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 20:37:34 +01:00
Fixes an issue with Hivebot bombers (#7327)
Basically if two exploded in close proximity to each other it could lead to infinite recursion, crashing the server.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user