summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-28 08:44:09 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:32:43 +0200
commit68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9 (patch)
tree43edb86a4cf57d7a643b45ef82694e34f56d568e
parentFix sin & cos calls (diff)
downloadre3-68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9.tar
re3-68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9.tar.gz
re3-68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9.tar.bz2
re3-68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9.tar.lz
re3-68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9.tar.xz
re3-68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9.tar.zst
re3-68b5270fe459ad86d9cb8a449c0d9b7efe57d2d9.zip
-rw-r--r--src/control/OnscreenTimer.cpp2
-rw-r--r--src/core/main.cpp2
-rw-r--r--src/peds/Ped.cpp2
-rw-r--r--src/peds/PlayerPed.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/control/OnscreenTimer.cpp b/src/control/OnscreenTimer.cpp
index d128efeb..8cc1ae69 100644
--- a/src/control/OnscreenTimer.cpp
+++ b/src/control/OnscreenTimer.cpp
@@ -108,7 +108,7 @@ void COnscreenTimerEntry::Process() {
int32* timerPtr = CTheScripts::GetPointerToScriptVariable(m_nTimerOffset);
int32 oldTime = *timerPtr;
- int32 newTime = oldTime - int32(CTimer::GetTimeStepInSeconds() * 1000);
+ int32 newTime = oldTime - int32(CTimer::GetTimeStepInMilliseconds());
if(newTime < 0) {
*timerPtr = 0;
m_bTimerProcessed = 0;
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 58db2d34..492f481e 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -1180,7 +1180,7 @@ DisplayGameDebugText()
FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds
FramesPerSecond = FrameSamples / FramesPerSecondCounter;
#else
- FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f);
+ FramesPerSecondCounter += 1000.0f / CTimer::GetTimeStepNonClippedInMilliseconds();
FramesPerSecond = FramesPerSecondCounter / FrameSamples;
#endif
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index a564c9e5..5e1fb842 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -2501,7 +2501,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 53187d0b..46578486 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -714,7 +714,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);
@@ -1205,7 +1205,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);