Some regular fixes and UB fixes

This commit is contained in:
erorcun
2021-01-29 03:32:21 +03:00
parent 3dfffdf351
commit d52b917c54
5 changed files with 19 additions and 6 deletions

View File

@@ -1110,8 +1110,13 @@ DisplayGameDebugText()
#endif // #ifdef DRAW_GAME_VERSION_TEXT
FrameSamples++;
#ifdef FIX_BUGS
FramesPerSecondCounter += frameTime / 1000.f; // convert to seconds
FramesPerSecond = FrameSamples / FramesPerSecondCounter;
#else
FramesPerSecondCounter += 1000.0f / (CTimer::GetTimeStepNonClippedInSeconds() * 1000.0f);
FramesPerSecond = FramesPerSecondCounter / FrameSamples;
#endif
if ( FrameSamples > 30 )
{