Add SA-MP fast weapon strafe glitch - #5103
Open
Dryxio wants to merge 1 commit into
Open
Conversation
FileEX
reviewed
Jul 31, 2026
Dryxio
force-pushed
the
fast-weapon-strafe
branch
from
July 31, 2026 01:34
dcd53b3 to
54fe598
Compare
Dryxio
force-pushed
the
fast-weapon-strafe
branch
from
July 31, 2026 01:36
54fe598 to
dc8aeca
Compare
|
cool. SA combat system really seems pretty stiff. |
|
It looks great—this is something I've wanted for a while. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR add
fastweaponstrafeto the existing glitch functions:When enabled, changing direction while aiming react faster, similar to SA-MP.
It is disabled by default and the normal MTA movement stay unchanged when it is off.
Demo
sampstrafe_10mb.mp4
Motivation
This is not really a GTA or MTA bug, because MTA reproduce the original GTA SA behaviour here. But the direction changes while aiming feels very slow and not really enjoyable for gunplay. For players coming from SA-MP, this is also one of the complaint I heard the most about MTA gunplay.
Following the discussion in #2228, we tried for a long time to reproduce the SA-MP feeling only in Lua, by changing animation speed, blend time or replacing the gunmove animations. Some results were close, but never worked properly and not the same feeling at all.
The closest result we got was this Lua attempt,
but it was still not the same behaviour and was not clean enough to use.
The reason is that these Lua solutions only modify the animations, but cannot change the internal movement timestep used during the transition. This is why the behaviour cannot be reproduced cleanly only with a resource.
Closes #2228
Implementation
SA-MP use a separate timestep for
CTaskSimpleUseGun::ControlGunMove, calculated from the frame rate sampled over short intervals. This PR reproduce this behaviour while the glitch is enabled and keep the current MTA code path when it is disabled.The option is added to the existing client and server glitch lists. Its state is also synchronized in MapInfo with a versioned bit, so it is correctly applied when joining or reconnecting.
Test plan
Test resource:
faststrafe.zip
Server:
Client:
Aim with a weapon and alternate between left and right movement. The first command enable the faster direction changes and the second command restore the normal MTA behaviour.
Checklist