mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 05:29:01 +00:00
Fix some timer calls
This commit is contained in:
parent
a11bf19b93
commit
68b5270fe4
4 changed files with 5 additions and 5 deletions
|
@ -108,7 +108,7 @@ void COnscreenTimerEntry::Process() {
|
||||||
|
|
||||||
int32* timerPtr = CTheScripts::GetPointerToScriptVariable(m_nTimerOffset);
|
int32* timerPtr = CTheScripts::GetPointerToScriptVariable(m_nTimerOffset);
|
||||||
int32 oldTime = *timerPtr;
|
int32 oldTime = *timerPtr;
|
||||||
int32 newTime = oldTime - int32(CTimer::GetTimeStepInSeconds() * 1000);
|
int32 newTime = oldTime - int32(CTimer::GetTimeStepInMilliseconds());
|
||||||
if(newTime < 0) {
|
if(newTime < 0) {
|
||||||
*timerPtr = 0;
|
*timerPtr = 0;
|
||||||
m_bTimerProcessed = 0;
|
m_bTimerProcessed = 0;
|
||||||
|
|
|
@ -1180,7 +1180,7 @@ DisplayGameDebugText()
|
||||||
FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds
|
FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds
|
||||||
FramesPerSecond = FrameSamples / FramesPerSecondCounter;
|
FramesPerSecond = FrameSamples / FramesPerSecondCounter;
|
||||||
#else
|
#else
|
||||||
FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f);
|
FramesPerSecondCounter += 1000.0f / CTimer::GetTimeStepNonClippedInMilliseconds();
|
||||||
FramesPerSecond = FramesPerSecondCounter / FrameSamples;
|
FramesPerSecond = FramesPerSecondCounter / FrameSamples;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2501,7 +2501,7 @@ CPed::ProcessControl(void)
|
||||||
if (m_nPedState == PED_JUMP) {
|
if (m_nPedState == PED_JUMP) {
|
||||||
if (m_nWaitTimer <= 2000) {
|
if (m_nWaitTimer <= 2000) {
|
||||||
if (m_nWaitTimer < 1000)
|
if (m_nWaitTimer < 1000)
|
||||||
m_nWaitTimer += CTimer::GetTimeStep() * 0.02f * 1000.0f;
|
m_nWaitTimer += CTimer::GetTimeStepInMilliseconds();
|
||||||
} else {
|
} else {
|
||||||
m_nWaitTimer = 0;
|
m_nWaitTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -714,7 +714,7 @@ CPlayerPed::PlayerControl1stPersonRunAround(CPad *padUsed)
|
||||||
if (m_nPedState == PED_JUMP) {
|
if (m_nPedState == PED_JUMP) {
|
||||||
if (bIsInTheAir) {
|
if (bIsInTheAir) {
|
||||||
if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f)
|
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 angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O
|
||||||
float angleCos = Cos(m_fRotationCur);
|
float angleCos = Cos(m_fRotationCur);
|
||||||
|
@ -1205,7 +1205,7 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed)
|
||||||
if (m_nPedState == PED_JUMP) {
|
if (m_nPedState == PED_JUMP) {
|
||||||
if (bIsInTheAir) {
|
if (bIsInTheAir) {
|
||||||
if (bUsesCollision && !bHitSteepSlope && (!bHitSomethingLastFrame || m_vecDamageNormal.z > 0.6f)
|
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 angleSin = Sin(m_fRotationCur); // originally sin(DEGTORAD(RADTODEG(m_fRotationCur))) o_O
|
||||||
float angleCos = Cos(m_fRotationCur);
|
float angleCos = Cos(m_fRotationCur);
|
||||||
|
|
Loading…
Reference in a new issue