shithub: choc

Download patch

ref: 3579a07a56d6bdd2150e6d3a07817b60b53cea20
parent: 3ab5b528112a0bc9e10bb852e8ae8f2a47103348
author: Simon Howard <[email protected]>
date: Fri Oct 27 19:15:23 EDT 2006

Allow multiple dehacked patches to be specified with the -deh command
line paramter, as with -file.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 741

--- a/src/deh_main.c
+++ b/src/deh_main.c
@@ -335,16 +335,22 @@
 
 void DEH_Init(void)
 {
-    int argc;
+    int p;
 
     InitialiseSections();
 
-    argc = M_CheckParm("-deh");
+    p = M_CheckParm("-deh");
 
-    if (argc > 0)
+    if (p > 0)
     {
-        printf(" loading %s\n", myargv[argc+1]);
-        DEH_ParseFile(myargv[argc+1]);
+        ++p;
+
+        while (p < myargc && myargv[p][0] != '-')
+        {
+            printf(" loading %s\n", myargv[p]);
+            DEH_ParseFile(myargv[p]);
+            ++p;
+        }
     }
 }