shithub: choc

Download patch

ref: 38da738fd72f18b44d05d30450cb0d3d4d7aefe5
parent: c2c54b9b246de518d49be15f1c0de6261e50823b
author: Nuke.YKT <alexeytf2@gmail.com>
date: Sun Jul 26 17:00:54 EDT 2015

doom:Chex's warp cheat handling fix

Chex Quest exe also prevents maps highter than 5

--- a/src/doom/st_stuff.c
+++ b/src/doom/st_stuff.c
@@ -618,13 +618,21 @@
       {
 	epsd = buf[0] - '0';
 	map = buf[1] - '0';
-      }
 
-      // Chex.exe always warps to episode 1.
+    // Chex.exe always warps to episode 1.
 
-      if (gameversion == exe_chex)
-      {
-        epsd = 1;
+    if (gameversion == exe_chex)
+    {
+        if (epsd > 1)
+        {
+            epsd = 1;
+        }
+        if (map > 5)
+        {
+            map = 5;
+        }
+    }
+
       }
 
       // Catch invalid maps.