ref: 9a8cf12227923e3b2b83625d5b91af2f58cd856b
parent: a42a4824fa7e4d883a2f710c91655b2edb02f525
author: Simon Howard <[email protected]>
date: Sun Dec 23 13:15:46 EST 2012
Fix Doom episode 4 par time selection. Subversion-branch: /branches/v2-branch Subversion-revision: 2550
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -1379,10 +1379,17 @@
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++)