summaryrefslogtreecommitdiff
path: root/src/peds
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-06-05 13:13:27 +0300
committerSergeanur <s.anureev@yandex.ua>2021-06-24 21:34:33 +0300
commitfad64667a7b0199786a6c031248ad726fdc9d22d (patch)
treeb669d06ed09dae469d6a6054d97d81835fda213e /src/peds
parent6e4a2947ea55fc19ba1ba7f10c08a2ed1d54d135 (diff)
Fix some timer calls
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp2
-rw-r--r--src/peds/PlayerPed.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 8ad7027e..919359d4 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -2382,7 +2382,7 @@ CPed::ProcessControl(void)
if (m_nPedState == PED_JUMP) {
if (m_nWaitTimer <= 2000) {
if (m_nWaitTimer < 1000)
- m_nWaitTimer += CTimer::GetTimeStep() * 0.02f * 1000.0f;
+ m_nWaitTimer += CTimer::GetTimeStepInMilliseconds();
} else {
m_nWaitTimer = 0;
}
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 65180ee5..4ff4e575 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -869,7 +869,7 @@ CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed)
if (m_nPedState == PED_JUMP) {
if (bIsInTheAir) {
if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f)
- && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
+ && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O
float angleCos = Cos(m_fRotationCur);
@@ -1483,7 +1483,7 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed)
if (m_nPedState == PED_JUMP) {
if (bIsInTheAir) {
if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f)
- && m_fDistanceTravelled < CTimer::GetTimeStep() * 0.02 && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
+ && m_fDistanceTravelled < CTimer::GetTimeStepInSeconds() && m_vecMoveSpeed.MagnitudeSqr() < 0.01f) {
float angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O
float angleCos = Cos(m_fRotationCur);