From c5e14071f97345a7770df53fa205de30bb19fd9d Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Mon, 13 Nov 2023 00:44:11 -0800 Subject: [PATCH] Fixes guns occasionally ceasing to work (#4882) # About the pull request https://github.com/tgstation/TerraGov-Marine-Corps/pull/10691 Credit to BraveMole for the original PR and thegamer01 for letting me know about the PR, I made some changes to make it work better # Changelog :cl: BraveMole, Zonespace fix: Guns should no longer very rarely jam mid-burst. /:cl: --- code/datums/components/autofire/autofire.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/datums/components/autofire/autofire.dm b/code/datums/components/autofire/autofire.dm index d052127effc3..455fb70a9fa1 100644 --- a/code/datums/components/autofire/autofire.dm +++ b/code/datums/components/autofire/autofire.dm @@ -82,6 +82,8 @@ /datum/component/automatedfire/autofire/proc/initiate_shot() SIGNAL_HANDLER if(shooting)//if we are already shooting, it means the shooter is still on cooldown + if(bursting && (world.time > (next_fire + (burstfire_shot_delay * burst_shots_to_fire)))) + hard_reset() return shooting = TRUE process_shot()