Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

FileEX
Copy link
Member

@FileEX FileEX commented Jul 28, 2025

Fixed #534

Original author: #1603

In addition to fixing the precision of IsOnGround, this PR adds a checkVehicles argument that allows specifying whether the function should return true if the ped is standing on a vehicle (by default it returns false, as before).

@ArranTuna
Copy link
Collaborator

I have tested this PR and confirms it fixes isPedOnGround being unreliable, when you were moving on a slope isPedOnGround would flicker between true/false now it stays on true.

This might not seem like an important fix, but it might be the reason why there is significant player movement desync where players can be seen moving forwards and then snapping back when the next puresync packet arrives because IsOnGround is used in puresync so if 1 puresync update sends you as not on ground it can cause this: "they’re flagged as airborne. While flagged airborne, puresync enables velocity-based prediction with little or no friction, so the remote player keeps sliding forward even after their real movement stops"

This desync is brought up a lot by players, so if this does fix it, they'd be very happy. And at the very least it'd fix this function which is also itself quite a useful fix.

@Dutchman101
Copy link
Member

Nice, this will likely be backported to the next 1.6.0 build that'll also be circulated, so it can be of use before the release of 1.7

@Dutchman101 Dutchman101 merged commit 257f4cd into multitheftauto:master Aug 12, 2025
7 checks passed
MTABot pushed a commit that referenced this pull request Aug 12, 2025
257f4cd Fix isPedOnGround (#4317)
88ca35e Update client en_US pot
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.

isPedOnGround issues
5 participants