isPedOnGround is still unreliable
Closed this issue · 0 comments
Describe the bug
I tested @FileEX 's isPedOnGround fix and it worked flawlessly, but now I am testing it on the 1.7 build (verified it is added as the isPedOnGround(localPlayer, true) returns true when stood on a vehicle) and it doesn't work any better than before. Which is weird as I am testing it in the exact same place.
The "NOG" means not on ground, usually it only flickers between on ground and not on ground, but if you stand at the exact right spot you can get it to constantly return not on ground like in the photo. It only happens on any ground that isn't perfectly flat.
Steps to reproduce
crun setElementPosition(localPlayer, -467.65127563477, -614.13177490234, 16.864654541016)
crun isPedOnGround(localPlayer) -- will return false, or at least does for me.
Also you can test it this way:
crun setTimer(function() if not isPedOnGround(localPlayer) then outputChatBox("not on ground") end end, 1, 0)
Then just walk around on any unlevel ground and "not on ground" will fill your chatbox. If you go to the top of that warehouse access track to where it is perfectly level, it works fine, but on the sloped access track, very unreliable, which causes the player position de-sync whenever a pure-sync packet is sent with incorrect on ground state.
Version
Multi Theft Auto v1.7-untested-25399
MTA:SA Server v1.7-untested-25399
Additional context
No response
Relevant log output
Security Policy
- I have read and understood the Security Policy and this issue is not security related.