From bb300a96b54e5995f73c6d63197f36d791004e8b Mon Sep 17 00:00:00 2001 From: Zach Charo Date: Sat, 7 Aug 2021 04:24:10 +0000 Subject: [PATCH] vehicle collisions and sprinting on steep grades helps with ped<->vehicle collisions and sprinting on steep grades at high framerates --- src/peds/Ped.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 3ccae5d0..173f2c3a 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -1540,6 +1540,12 @@ CPed::UpdatePosition(void) velocityChange = velocityChange * (changeMult / speedChange); } } + +#ifdef FIX_BUGS + //helps with ped<->vehicle collisions and sprinting on steep grades at high framerates + velocityChange *= CTimer::GetTimeStepFix(); +#endif + m_vecMoveSpeed.x += velocityChange.x; m_vecMoveSpeed.y += velocityChange.y; }