diff --git a/code/modules/projectiles/ammunition/ammo_pile.dm b/code/modules/projectiles/ammunition/ammo_pile.dm index 481b9247a27..3cab40f26f2 100644 --- a/code/modules/projectiles/ammunition/ammo_pile.dm +++ b/code/modules/projectiles/ammunition/ammo_pile.dm @@ -205,11 +205,15 @@ check_ammo() /obj/item/ammo_pile/proc/scatter() + var/turf/T = get_turf(src) for(var/thing in ammo) var/obj/bullet = thing - bullet.forceMove(get_turf(src)) + UnregisterSignal(bullet, COMSIG_QDELETING) + bullet.forceMove(T) bullet.throw_at_random(FALSE, 2, 7) - remove_ammo(bullet) + ammo.Cut() + CutOverlays() + qdel(src) /obj/item/ammo_pile/throw_at() ..() diff --git a/html/changelogs/hellfirejag-ammo-pile-fix.yml b/html/changelogs/hellfirejag-ammo-pile-fix.yml new file mode 100644 index 00000000000..bef5a79f2f9 --- /dev/null +++ b/html/changelogs/hellfirejag-ammo-pile-fix.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed both a runtime error and a hard delete related to ammo piles."