From b8ee1125f3cc1fc65fb87f7623f85ac7be8095ed Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Sat, 29 Sep 2018 22:00:37 -0400 Subject: [PATCH] Fix rocket launcher unloading bug (#40580) --- code/modules/projectiles/guns/ballistic/launchers.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/ballistic/launchers.dm b/code/modules/projectiles/guns/ballistic/launchers.dm index 211e674111a..97d12d2377d 100644 --- a/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/code/modules/projectiles/guns/ballistic/launchers.dm @@ -104,12 +104,17 @@ /obj/item/gun/ballistic/automatic/rocketlauncher/attack_self(mob/living/user) if(magazine) + if(chambered) + chambered.forceMove(magazine) + magazine.stored_ammo.Insert(1, chambered) + chambered = null + else + stack_trace("Removed [magazine] from [src] without a chambered round") magazine.forceMove(drop_location()) user.put_in_hands(magazine) playsound(src, 'sound/weapons/gun_magazine_remove_full.ogg', 70, TRUE) to_chat(user, "You work the [magazine] out from [src].") magazine = null - chambered = null else to_chat(user, "There's no rocket in [src].") update_icon()