shithub: choc

Download patch

ref: 10d4be9bae97006ee0b3735d3392666d74bf965c
parent: 25c67b716015e1a5cf9379ffcb7fd6e8a62766c6
author: Simon Howard <[email protected]>
date: Mon Jun 8 17:22:35 EDT 2015

hexen: Replace v1.0 warning with an error.

The warning message would have been missed by anyone not running from
the console (ie. a good portion of all Windows and Mac users), so
replace the warning message with an error instead (I_Error calls
produce a GUI message popup). Allow this behavior to be overridden by
using a special command line flag.

--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -270,15 +270,26 @@
 	maxplayers = 4;
     }
 
-    // The v1.0 IWAD file is missing a bunch of lumps.
-    if (gamemode != shareware && W_CheckNumForName("CLUS1MSG") == -1)
+    // The v1.0 IWAD file is missing a bunch of lumps that can cause the game
+    // to crash, so we exit with an error if the user tries to play with it.
+    // But we provide an override command line flag if they really want to
+    // do it.
+
+    //!
+    // If provided, the check for the v1.0 IWAD file is disabled, even though
+    // it will almost certainly cause the game to crash.
+    //
+    // @category compat
+    //
+
+    if (!M_ParmExists("-v10override")
+     && gamemode != shareware && W_CheckNumForName("CLUS1MSG") < 0)
     {
-        printf(
-            "** WARNING: You are playing with the Hexen v1.0 IWAD. This\n"
-            "** isn't supported by " PACKAGE_NAME ", and you may find that\n"
-            "** the game will crash. Please upgrade to the v1.1 IWAD file.\n"
-            "** See here for more information:\n"
-            "**   http://www.doomworld.com/classicdoom/info/patches.php\n");
+        I_Error(
+            "You are trying to use the Hexen v1.0 IWAD. This isn't\n"
+            "supported by " PACKAGE_NAME ". Please upgrade to the v1.1\n"
+            "IWAD file. See here for more information:\n"
+            "  http://www.doomworld.com/classicdoom/info/patches.php");
     }
 }