shithub: choc

Download patch

ref: 86c6148b2141c3d0d08137dd377f80087321cc98
parent: 04ecd397e8a7d7e22e41b282cd0c28d4795a904f
author: Acts 19 quiz <63941237+Acts19quiz@users.noreply.github.com>
date: Thu Mar 18 12:03:32 EDT 2021

Add chex.exe par times for chex.wad. (#1356)

* Add chex.exe par times for chex.wad.

* Merge Chex array into Doom 1's to fix #1355

* Remove map count check.

* Reinstate Chex array with checks to truncate it to fix #1355

* Rename qpars to chexpars fix #1355

* Add gameepisode check to Chex par time calculation #1355

* Trim fat, remove first {0} sub-array. #1355

* Remove brackets on chexpars to match cpars. #1355

Co-authored-by: Acts 19 quiz <N/A>

--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -1319,6 +1319,12 @@
     240,150,180,150,150,300,330,420,300,180,	// 21-30
     120,30					// 31-32
 };
+
+// Chex Quest Par Times
+int chexpars[6] = 
+{ 
+    0,120,360,480,200,360
+}; 
  
 
 //
@@ -1480,7 +1486,14 @@
     // overflows into the cpars array.
     else if (gameepisode < 4)
     {
-        wminfo.partime = TICRATE*pars[gameepisode][gamemap];
+        if (gameversion == exe_chex && gameepisode == 1 && gamemap < 6)
+        {
+            wminfo.partime = TICRATE*chexpars[gamemap];
+        }
+        else
+        {
+            wminfo.partime = TICRATE*pars[gameepisode][gamemap];
+        }
     }
     else
     {