From 0289d9ad9f9544e2cca51e3ef45653dc4c9773ec Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 12 Nov 2017 13:49:53 +0100 Subject: [PATCH] - the timing compensation which was necessary for millisecond-precise timing is not needed anymore with nanoseconds. --- src/cmdlib.h | 16 +--------------- src/statistics.cpp | 4 ++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/cmdlib.h b/src/cmdlib.h index 605a56995a..f8fdfc4962 100644 --- a/src/cmdlib.h +++ b/src/cmdlib.h @@ -65,23 +65,9 @@ struct FFileList void ScanDirectory(TArray &list, const char *dirpath); -//========================================================================== -// -// Functions to compensate for a tic being a bit short. -// Since ZDoom uses a milliseconds timer for game timing -// 35 tics are actually only 0.98 seconds. -// For real time display this needs to be adjusted -// -//========================================================================== - -inline int AdjustTics(int tics) -{ - return Scale(tics, 98, 100); -} - inline int Tics2Seconds(int tics) { - return Scale(tics, 98, (100 * TICRATE)); + return tics * TICRATE; } diff --git a/src/statistics.cpp b/src/statistics.cpp index e96f103272..2abd0bf12c 100644 --- a/src/statistics.cpp +++ b/src/statistics.cpp @@ -420,7 +420,7 @@ static void StoreLevelStats() LevelData[i].killcount = level.killed_monsters; LevelData[i].totalsecrets = level.total_secrets; LevelData[i].secretcount = level.found_secrets; - LevelData[i].leveltime = AdjustTics(level.maptime); + LevelData[i].leveltime = level.maptime; // Check for living monsters. On some maps it can happen // that the counter misses some. @@ -490,7 +490,7 @@ void STAT_ChangeLevel(const char *newl) } infostring.Format("%4d/%4d, %3d/%3d, %2d", statvals[0], statvals[1], statvals[2], statvals[3], validlevels); - FSessionStatistics *es = StatisticsEntry(sl, infostring, AdjustTics(level.totaltime)); + FSessionStatistics *es = StatisticsEntry(sl, infostring, level.totaltime); for(unsigned i = 0; i < LevelData.Size(); i++) {