From f34c09bc3723f4c64ae50c778106f9a4d5f01eb2 Mon Sep 17 00:00:00 2001 From: Lance Date: Thu, 25 Oct 2007 07:29:59 +0000 Subject: [PATCH] fix in map loading code, quake can now load dm6++ git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2762 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_ccmds.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/engine/server/sv_ccmds.c b/engine/server/sv_ccmds.c index 49213b1fd..35e654612 100644 --- a/engine/server/sv_ccmds.c +++ b/engine/server/sv_ccmds.c @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef CLIENTONLY -#ifndef INVALID_SOCKET +#ifndef INVALID_SOCKET #define INVALID_SOCKET -1 #endif @@ -444,11 +444,15 @@ void SV_Map_f (void) waschangelevel = !strcmp(Cmd_Argv(0), "changelevel"); wasspmap = !strcmp(Cmd_Argv(0), "spmap"); - nextserver = strchr(level, '+'); - if (nextserver) + snprintf (expanded, sizeof(expanded), "maps/%s.bsp", level); // this function and the if statement below, is a quake bugfix which stopped a map called "dm6++.bsp" from loading because of the + sign, quake2 map syntax interprets + character as "intro.cin+base1.bsp", to play a cinematic then load a map after + if (!COM_FCheckExists (expanded)) { - *nextserver = '\0'; - nextserver++; + nextserver = strchr(level, '+'); + if (nextserver) + { + *nextserver = '\0'; + nextserver++; + } } if (startspot)