-
-
Notifications
You must be signed in to change notification settings - Fork 488
Fix isPedOnGround #4317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix isPedOnGround #4317
Conversation
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. |
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 |
Fixed #534
Original author: #1603
In addition to fixing the precision of
IsOnGround
, this PR adds acheckVehicles
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).