ref: 44c79f31be31e20421f0ea85a3053157e258e1bb
parent: f0cbb3aa78575448238c4b8ee66fa0cfaee3a855
parent: e1b99d9e264d00ef2fa0e7b73e8530621e62e921
author: Fabien <[email protected]>
date: Thu Jan 30 04:11:15 EST 2014
Merge pull request #13 from willy9561/issue12_add_map 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)