Skip to content

Conversation

NexiusTailer
Copy link
Contributor

@NexiusTailer NexiusTailer commented Aug 10, 2025

  1. Fixes two critical issues in vehicle (driver) sync processing: they're both caused by wrong code order when pure validation checks which drops the packet executed after some side effects are applied, but those checks must be before them. This way it prevents partial updates from invalid driver sync. The first place was inside PlayerVehicleSyncHandler and the second in updateFromDriverSync.
  2. Fixes critical behavior difference when passenger sync could be passed with any passenger position a cheater want to spoof. SA-MP server ignores what was received by the sender and rewrites the new passenger position with the one his vehicle has now. This change prevents areas for abuse in the existing SA-MP scripts: for example, many anticheats don't check passengers for teleport hack because according to original SA-MP behavior the passenger can update his position in vehicle only if it has no driver, via unoccupied sync.
  3. Fixes passenger sync spoofing for non-streamed vehicles, considering train carriages (#1053).
  4. Drops unoccupied sync if the cheater send vehicle update from 0 seat being actually a passenger (the check for not being a passenger and updating unoccupied vehicle from passenger seats already was presented, though).
  5. Normalizes trailer quaternion from the server side since samp clients don't do it specifically for trailer sync for some reason, so it can be abused by cheaters like they do with unoccupied sync roll/direction matrix.

NexiusTailer and others added 5 commits August 10, 2025 14:25
by fixing the code order in PlayerVehicleSyncHandler, moving validation checks first
by fixing the code order in updateFromDriverSync, moving pure validations first
eliminating areas for abuse, like in SA-MP server
but also add a check for train carriages, since they always consider unstreamed
Copy link

@itsneufox itsneufox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Contributor

@edgyaf edgyaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Vertified

Copy link
Member

@midosvt midosvt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this PR is like taking a messy plate of spaghetti code, untangling the noodles, and putting them back in order before anyone chokes on them. 🍝

The fixes make total sense -- moving validation checks before side effects is the programming equivalent of washing your hands before eating, not after. Also, I appreciate the cheater smackdown -- no more ‘free teleport to anywhere’ passenger perks. ✈️

Overall: looking really good. Clean, logical, and it closes some pretty nasty loopholes. Thanks for making vehicle sync less of a clown car. 🚗🤡

Copy link
Collaborator

@NotUnlikeTheWaves NotUnlikeTheWaves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waowieee

Copy link

@thelante thelante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gud

@AmyrAhmady AmyrAhmady merged commit 42b0450 into openmultiplayer:master Sep 20, 2025
13 checks passed
@NexiusTailer NexiusTailer deleted the patch-1 branch September 20, 2025 13:21
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.