Skip to content
Permalink
Browse files

Merge pull request #1218 from chocolate-doom/partime-map33

doom: correctly determine the par time for MAP33
  • Loading branch information
fabiangreffrath committed Nov 25, 2019
2 parents 1308975 + 00d2024 commit 10408d83e5f53cd8b61a45b42ffb22d983f4975a
Showing with 9 additions and 3 deletions.
  1. +8 −2 src/doom/g_game.c
  2. +1 −1 src/doom/statdump.c
@@ -38,6 +38,7 @@
#include "i_system.h"
#include "i_timer.h"
#include "i_input.h"
#include "i_swap.h"
#include "i_video.h"

#include "p_setup.h"
@@ -1460,10 +1461,15 @@ void G_DoCompleted (void)
// statcheck regression testing.
if (gamemode == commercial)
{
// map33 has no official time: initialize to zero
// map33 reads its par time from beyond the cpars[] array
if (gamemap == 33)
{
wminfo.partime = 0;
int cpars32;

memcpy(&cpars32, DEH_String(GAMMALVL0), sizeof(int));
cpars32 = LONG(cpars32);

wminfo.partime = TICRATE*cpars32;
}
else
{
@@ -268,7 +268,7 @@ static void PrintLevelName(FILE *stream, int episode, int level)

static void PrintStats(FILE *stream, wbstartstruct_t *stats)
{
int leveltime, partime;
short leveltime, partime;
int i;

PrintLevelName(stream, stats->epsd, stats->last);

0 comments on commit 10408d8

Please sign in to comment.
You can’t perform that action at this time.