- the timing compensation which was necessary for millisecond-precise timing is not needed anymore with nanoseconds.

This commit is contained in:
Christoph Oelckers 2017-11-12 13:49:53 +01:00
parent efa7c3cacf
commit 0289d9ad9f
2 changed files with 3 additions and 17 deletions

View file

@ -65,23 +65,9 @@ struct FFileList
void ScanDirectory(TArray<FFileList> &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;
}

View file

@ -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++)
{