summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2012-12-23 18:15:46 +0000
committerSimon Howard2012-12-23 18:15:46 +0000
commit9a8cf12227923e3b2b83625d5b91af2f58cd856b (patch)
treec1227f28306b6e994b59e15cfae06dd864d9b616
parenta42a4824fa7e4d883a2f710c91655b2edb02f525 (diff)
downloadchocolate-doom-9a8cf12227923e3b2b83625d5b91af2f58cd856b.tar.gz
chocolate-doom-9a8cf12227923e3b2b83625d5b91af2f58cd856b.tar.bz2
chocolate-doom-9a8cf12227923e3b2b83625d5b91af2f58cd856b.zip
Fix Doom episode 4 par time selection.
Subversion-branch: /branches/v2-branch Subversion-revision: 2550
-rw-r--r--src/doom/g_game.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/doom/g_game.c b/src/doom/g_game.c
index 4ffddb41..f4b64271 100644
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -1379,10 +1379,17 @@ void G_DoCompleted (void)
wminfo.maxitems = totalitems;
wminfo.maxsecret = totalsecret;
wminfo.maxfrags = 0;
- if ( gamemode == commercial )
- wminfo.partime = TICRATE*cpars[gamemap-1];
+
+ // Set par time. Doom episode 4 doesn't have a par time, so this
+ // overflows into the cpars array. It's necessary to emulate this
+ // for statcheck regression testing.
+ if (gamemode == commercial)
+ wminfo.partime = TICRATE*cpars[gamemap-1];
+ else if (gameepisode < 4)
+ wminfo.partime = TICRATE*pars[gameepisode][gamemap];
else
- wminfo.partime = TICRATE*pars[gameepisode][gamemap];
+ wminfo.partime = TICRATE*cpars[gamemap];
+
wminfo.pnum = consoleplayer;
for (i=0 ; i<MAXPLAYERS ; i++)