MrCrayfish's Gun Mod

MrCrayfish's Gun Mod

25M Downloads

[Bug] Automatic guns firing second shot 1-tick early

zaeonNineZero opened this issue ยท 0 comments

commented

When firing automatic guns, the second shot of sustained fire appears to occur 1 tick earlier than the set fire rate would indicate.

For example, the Assault Rifle has a fire rate of 3, so 1 shot every 3 ticks. The second shot of sustained fire occurs only 2 ticks after the first shot, instead of after 3 ticks like it should. This effect becomes more obvious when the Weighted Stock is equipped on the Assault Rifle, which gives it a rate of fire of 4. In this configuration, the second shot comes after 3 ticks instead of 4 ticks.

For guns with a rate of fire of 1 (i.e. the Micro SMG from my addon mod), the second shot appears to occur on the same tick as the first shot.

While testing for this bug with non-automatic weapons is more challenging, it appears that non-automatic guns such as the Pistol are also affected.

The pull request "Fix Bug and Add More Gun Options" #430 might have a fix for this bug.

Tested on 1.3.4 for 1.19.2, as well as 1.3.3 for 1.18.2 and 1.3.4 for 1.19.3, with only a few mods installed. I have also experienced this bug as far back as 1.2.8 for 1.19.2. Notably, this bug does not occur on the latest release for 1.16.5 (v1.2.6)