mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-16 16:41:30 +00:00
added back -basedir
This commit is contained in:
parent
9f476ee5c6
commit
69edf96241
1 changed files with 23 additions and 1 deletions
24
source/cmd.c
24
source/cmd.c
|
@ -294,7 +294,7 @@ void Cmd_StuffCmds_f (void)
|
|||
return;
|
||||
|
||||
// pull out the commands
|
||||
build = malloc (s+1);
|
||||
build = malloc (s+21); // LordHavoc: +21 instead of +1 to account for potential basedir expansion
|
||||
build[0] = 0;
|
||||
|
||||
for (i=0 ; i<s-1 ; i++)
|
||||
|
@ -316,6 +316,28 @@ void Cmd_StuffCmds_f (void)
|
|||
com_cmdline[j] = c;
|
||||
i = j-1;
|
||||
}
|
||||
// LordHavoc: added -basedir back, though I don't think this is the best place, or the most ideal way...
|
||||
else if (com_cmdline[i] == '-')
|
||||
{
|
||||
i++;
|
||||
|
||||
for (j=i ; ((com_cmdline[j] != '+')
|
||||
&& (com_cmdline[j] != '-')
|
||||
&& (com_cmdline[j] != 0)) ; j++)
|
||||
;
|
||||
|
||||
c = com_cmdline[j];
|
||||
com_cmdline[j] = 0;
|
||||
|
||||
if (strncmp(com_cmdline+i,"basedir ", 8)==0)
|
||||
{
|
||||
strcat (build, "set fs_userpath ");
|
||||
strcat (build, com_cmdline+i+8);
|
||||
strcat (build, "\n");
|
||||
}
|
||||
com_cmdline[j] = c;
|
||||
i = j-1;
|
||||
}
|
||||
}
|
||||
|
||||
//Con_Printf("[\n%s]\n",build);
|
||||
|
|
Loading…
Reference in a new issue