shithub: duke3d

Download patch

ref: e1b99d9e264d00ef2fa0e7b73e8530621e62e921
parent: f0cbb3aa78575448238c4b8ee66fa0cfaee3a855
author: Earl Baucum <earl.baucum@att.net>
date: Sun Oct 13 05:52:09 EDT 2013

add -map command

--- a/Game/src/config.c
+++ b/Game/src/config.c
@@ -625,12 +625,14 @@
    if( dummy ) strcpy(myname,_argv[dummy+1]);
    dummy = CheckParm("MAP");
 
-   boardfilename[0] = 0;
 
+
 	if( dummy )
 	{
 		if (!VOLUMEONE)
 		{
+			//boardfilename might be set from commandline only zero if we are replacing
+			boardfilename[0] = 0;
 			strcpy(boardfilename,_argv[dummy+1]);
 			if( strchr(boardfilename,'.') == 0)
 				strcat(boardfilename,".map");
--- a/Game/src/game.c
+++ b/Game/src/game.c
@@ -7151,7 +7151,18 @@
         {
             c = argv[i];
 
-            if (stricmp(c, "-net") == 0)
+			if (stricmp(c, "-map") == 0)
+            {
+				i++;
+				strcpy(boardfilename,argv[i]);
+				if( strchr(boardfilename,'.') == 0)
+					strcat(boardfilename,".map");
+				printf("Using level: '%s'.\n",boardfilename);
+				continue;
+
+			}
+
+			if (stricmp(c, "-net") == 0)
             {
                 i += 2;  // skip filename.
 				// FIX_00044: Markers are now on by default in netgames (as real DOS duke3d)