Skip to content

Fix remote melee strafing and special-attack sync - #5319

Open
Dryxio wants to merge 2 commits into
multitheftauto:masterfrom
Dryxio:fix-remote-melee-sync
Open

Fix remote melee strafing and special-attack sync#5319
Dryxio wants to merge 2 commits into
multitheftauto:masterfrom
Dryxio:fix-remote-melee-sync

Conversation

@Dryxio

@Dryxio Dryxio commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes remote players losing the melee strafing animation and shaking during special attacks (aim + F by default).

Before :

strafe2_10mb.mp4

After :

strafe1_10mb.mp4

Motivation

Related to #630 (old bug yes)

Test plan

aim + F
hold aim and left/right to strafe in fight mode

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

Preserve melee aim/fire inputs in puresync because fight tasks do not use
TASK_SIMPLE_USE_GUN. Apply the existing fight-strafing behavior to all
melee weapons instead of restricting it to the unarmed slot.

Keep the observer camera front vector from overwriting remote fight
heading. Consume the special-attack edge after a simulation step so one
held input cannot repeatedly queue attacks between incoming packets.

Port the fix from Neon c3b90c264 to upstream master. Use the checked hook
installation convention and omit flag preservation: the continuations
do not consume integer flags before the epilogue overwrites them.

The instrumented Neon version was tested with two clients. Six local F
presses produced six single-frame remote edges, and 53 sampled stationary
special-attack frames showed no native heading drift. Final upstream
runtime testing and before/after recordings are still pending.
The upstream build was stopped at the user's request; no completed build
is claimed. Formatting and git diff --check passed.

Related to multitheftauto#630.
Reported in Dryxio/mtasa-neon#102.
@FileEX FileEX added sync bugfix Solution to a bug of any kind labels Sep 5, 2026
Comment thread Client/multiplayer_sa/multiplayer_keysync.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Solution to a bug of any kind sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants