Skip to content

Commit 4b20377

Browse files
authored
Better tolerance for isPedOnGround (#4379)
1 parent 57978aa commit 4b20377

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Client/mods/deathmatch/logic/CClientPed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4682,7 +4682,7 @@ bool CClientPed::IsOnGround(bool checkVehicles)
46824682
if (DefinitelyLessThan(vecPosition.fZ, fGroundLevel))
46834683
return false;
46844684

4685-
bool isOnGround = DefinitelyLessThan((vecPosition.fZ - fGroundLevel), 1.0f) || EssentiallyEqual((vecPosition.fZ - fGroundLevel), 1.0f);
4685+
bool isOnGround = DefinitelyLessThan((vecPosition.fZ - fGroundLevel), 1.0f, 1e-4f) || EssentiallyEqual((vecPosition.fZ - fGroundLevel), 1.0f, 1e-4f);
46864686
if (!isOnGround && checkVehicles && m_pPlayerPed)
46874687
return m_pPlayerPed->IsStandingOnEntity();
46884688

0 commit comments

Comments
 (0)