mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-25 23:23:45 +00:00
Fix some timer calls
This commit is contained in:
parent
3aac4ea62a
commit
776e8ff2ee
4 changed files with 5 additions and 5 deletions
|
@ -5399,7 +5399,7 @@ CCam::Process_FollowCar_SA(const CVector& CameraTarget, float TargetOrientation,
|
|||
|
||||
float alphaToFace = Atan2(hi.z, hi.Magnitude2D()) + DEGTORAD(15.0f);
|
||||
float neededAlphaTurn = alphaToFace - carGunUD;
|
||||
float alphaTurnPerFrame = CTimer::GetTimeStep() * 0.02f;
|
||||
float alphaTurnPerFrame = CTimer::GetTimeStepInSeconds();
|
||||
|
||||
if (neededAlphaTurn > alphaTurnPerFrame) {
|
||||
neededTurn = alphaTurnPerFrame;
|
||||
|
|
|
@ -1149,7 +1149,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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
@ -1484,7 +1484,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);
|
||||
|
|
Loading…
Reference in a new issue