mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-14 00:50:38 +00:00
Remove any trailing ".bsp" from mapname
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@313 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
95c62ee9c6
commit
f37e8be035
1 changed files with 12 additions and 1 deletions
|
@ -827,6 +827,7 @@ void Host_Map_f (void)
|
|||
key_dest = key_game; // remove console or menu
|
||||
SCR_BeginLoadingPlaque ();
|
||||
|
||||
// mapstring isn't used anywhere!
|
||||
cls.mapstring[0] = 0;
|
||||
for (i = 0; i < Cmd_Argc(); i++)
|
||||
{
|
||||
|
@ -836,7 +837,17 @@ void Host_Map_f (void)
|
|||
strcat (cls.mapstring, "\n");
|
||||
|
||||
svs.serverflags = 0; // haven't completed an episode yet
|
||||
strcpy (name, Cmd_Argv(1));
|
||||
|
||||
// remove (any) trailing ".bsp" from mapname S.A.
|
||||
|
||||
char mapname[64], *needle;
|
||||
strcpy (mapname, Cmd_Argv(1));
|
||||
|
||||
needle = strstr(mapname,".bsp");
|
||||
if (needle && (needle + 4 == mapname + Q_strlen(mapname)))
|
||||
needle[0] = '\0';
|
||||
|
||||
strcpy (name, mapname);
|
||||
SV_SpawnServer (name);
|
||||
if (!sv.active)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue