endless-sky icon indicating copy to clipboard operation
endless-sky copied to clipboard

fix(mechanics): Fix weapon jamming accumulation

Open TomGoodIdea opened this issue 5 months ago • 6 comments

Bug fix

This PR fixes #10442.

Summary

Jamming is supposed to reset the reload counter, so that after the (unsuccessful) attempt to fire, you need to wait another reload cycle. But currently there's a bug that causes the cycles to build up, which means that if you try to fire while your ship is scrambled, you may end up with a single "reload" lasting many normal reload cycles. Edit: this may be even more complicated (see the comments below).

With this patch, a single jam never blocks the weapon for more than one reload cycle.

Testing Done

It's kinda hard to reliably test this, but it seems to work now.

Wiki Update

N/A

Performance Impact

N/A

TomGoodIdea avatar Sep 15 '24 23:09 TomGoodIdea