Skip to content

Fix crouchbug firing delay when crouchbug glitch is enabled - #5229

Open
MohabCodeX wants to merge 1 commit into
multitheftauto:masterfrom
MohabCodeX:fix/crouchbug-firing-delay
Open

Fix crouchbug firing delay when crouchbug glitch is enabled#5229
MohabCodeX wants to merge 1 commit into
multitheftauto:masterfrom
MohabCodeX:fix/crouchbug-firing-delay

Conversation

@MohabCodeX

Copy link
Copy Markdown
Contributor

Fixes #2715

  • Made weapon fire-key and double-crouch suppression conditional on GLITCH_CROUCHBUG and GLITCH_FASTFIRE instead of unconditionally zeroing inputs for 600ms upon crouching.
  • Made post-fire crouch suppression check for GLITCH_CROUCHBUG in addition to GLITCH_FASTFIRE.
  • Preserved 600ms anti-exploit suppression when glitches are disabled.

Testing

cbug_delay_test.zip

  • Start resource, then use togglecbug command
  • Confirmed that with glitches enabled, weapon firing responds immediately upon crouching (~520-540ms standard GTA:SA animation length) without dropped clicks.
  • Confirmed that anti-exploit blocking remains active when glitches are disabled.

Before

[C-BUG TEST] All C-Bug Glitches are now DISABLED
[SHOT #1] Shot Interval: 1375ms (Shot 556ms after Crouch)
[SHOT #2] Shot Interval: 918ms (Shot 785ms after Crouch)
[SHOT #3] Shot Interval: 983ms (Shot 718ms after Crouch)
[SHOT #4] Shot Interval: 922ms (Shot 704ms after Crouch)
[SHOT #5] Shot Interval: 1170ms (Shot 676ms after Crouch)
[C-BUG TEST] All C-Bug Glitches are now ENABLED
[SHOT #6] Shot Interval: 3985ms
[SHOT #7] Shot Interval: 958ms (Shot 842ms after Crouch)
[SHOT #8] Shot Interval: 967ms (Shot 775ms after Crouch)
[SHOT #9] Shot Interval: 933ms (Shot 675ms after Crouch)
[SHOT #10] Shot Interval: 921ms (Shot 634ms after Crouch)
[SHOT #11] Shot Interval: 945ms (Shot 679ms after Crouch)
[SHOT #12] Shot Interval: 3413ms
[SHOT #13] Shot Interval: 731ms (Shot 677ms after Crouch)
[SHOT #14] Shot Interval: 749ms (Shot 526ms after Crouch)
[SHOT #15] Shot Interval: 1001ms (Shot 682ms after Crouch)
[SHOT #16] Shot Interval: 652ms (Shot 532ms after Crouch)
[SHOT #17] Shot Interval: 966ms (Shot 678ms after Crouch)
[SHOT #18] Shot Interval: 739ms (Shot 539ms after Crouch)
[C-BUG TEST] All C-Bug Glitches are now DISABLED
[SHOT #19] Shot Interval: 3424ms
[SHOT #20] Shot Interval: 1466ms (Shot 676ms after Crouch)
[SHOT #21] Shot Interval: 750ms (Shot 540ms after Crouch)
[SHOT #22] Shot Interval: 991ms (Shot 684ms after Crouch)
[SHOT #23] Shot Interval: 761ms (Shot 531ms after Crouch)
[SHOT #24] Shot Interval: 991ms (Shot 682ms after Crouch)
[SHOT #25] Shot Interval: 839ms (Shot 539ms after Crouch)

After

[C-BUG TEST] All C-Bug Glitches are now ENABLED
[SHOT #1] Shot Interval: 564ms (Shot 516ms after Crouch)
[SHOT #2] Shot Interval: 744ms (Shot 529ms after Crouch)
[SHOT #3] Shot Interval: 670ms (Shot 515ms after Crouch)
[SHOT #4] Shot Interval: 679ms (Shot 528ms after Crouch)
[SHOT #5] Shot Interval: 658ms (Shot 520ms after Crouch)
[SHOT #6] Shot Interval: 649ms (Shot 534ms after Crouch)
[SHOT #7] Shot Interval: 1821ms (Shot 529ms after Crouch)
[SHOT #8] Shot Interval: 814ms (Shot 536ms after Crouch)
[SHOT #9] Shot Interval: 616ms (Shot 533ms after Crouch)
[SHOT #10] Shot Interval: 670ms (Shot 514ms after Crouch)
[SHOT #11] Shot Interval: 723ms (Shot 555ms after Crouch)
[SHOT #12] Shot Interval: 645ms (Shot 533ms after Crouch)
[SHOT #13] Shot Interval: 612ms (Shot 536ms after Crouch)
[C-BUG TEST] All C-Bug Glitches are now DISABLED
[SHOT #14] Shot Interval: 6742ms
[SHOT #15] Shot Interval: 1276ms (Shot 745ms after Crouch)
[SHOT #16] Shot Interval: 588ms (Shot 548ms after Crouch)
[SHOT #17] Shot Interval: 1048ms (Shot 815ms after Crouch)
[SHOT #18] Shot Interval: 571ms (Shot 551ms after Crouch)
[SHOT #19] Shot Interval: 831ms (Shot 673ms after Crouch)
[SHOT #20] Shot Interval: 2229ms (Shot 988ms after Crouch)

…h is enabled

Allow immediate weapon firing and crouching when GLITCH_CROUCHBUG or
GLITCH_FASTFIRE is enabled by making fire-key and crouch-key suppression
conditional on the glitch state.
Fixes multitheftauto#2715
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crouchbug firing delay

1 participant