mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'exec-buf-again' into 'master'
COM_Exec_f: By default, insert into command buffer Closes #281 See merge request KartKrew/RingRacers!56
This commit is contained in:
commit
b75d4cc9fe
3 changed files with 16 additions and 5 deletions
|
|
@ -855,8 +855,19 @@ static void COM_Exec_f(void)
|
||||||
if (!COM_CheckParm("-silent"))
|
if (!COM_CheckParm("-silent"))
|
||||||
CONS_Printf(M_GetText("executing %s\n"), COM_Argv(1));
|
CONS_Printf(M_GetText("executing %s\n"), COM_Argv(1));
|
||||||
|
|
||||||
// insert text file into the command buffer
|
if (COM_CheckParm("-immediate"))
|
||||||
|
{
|
||||||
|
// immediately parses and executes all lines
|
||||||
|
// sidesteps wait from all sources, even self
|
||||||
COM_ImmedExecute((char *)buf);
|
COM_ImmedExecute((char *)buf);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// insert text file into the command buffer
|
||||||
|
// delays execution if interpreting wait cmd
|
||||||
|
COM_BufAddTextEx((char *)buf, com_flags);
|
||||||
|
COM_BufAddTextEx("\n", com_flags);
|
||||||
|
}
|
||||||
|
|
||||||
// free buffer
|
// free buffer
|
||||||
Z_Free(buf);
|
Z_Free(buf);
|
||||||
|
|
|
||||||
|
|
@ -3533,7 +3533,7 @@ void readmaincfg(MYFILE *f, boolean mainfile)
|
||||||
else if (fastcmp(word, "EXECCFG"))
|
else if (fastcmp(word, "EXECCFG"))
|
||||||
{
|
{
|
||||||
if (strchr(word2, '.'))
|
if (strchr(word2, '.'))
|
||||||
COM_BufAddText(va("exec %s\n", word2));
|
COM_BufAddText(va("exec \"%s\" -immediate\n", word2));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
lumpnum_t lumpnum;
|
lumpnum_t lumpnum;
|
||||||
|
|
|
||||||
|
|
@ -587,7 +587,7 @@ void Command_LoadConfig_f(void)
|
||||||
CV_InitFilterVar();
|
CV_InitFilterVar();
|
||||||
|
|
||||||
// exec the config
|
// exec the config
|
||||||
COM_BufInsertText(va("exec \"%s\"\n", configfile));
|
COM_BufInsertText(va("exec \"%s\" -immediate\n", configfile));
|
||||||
|
|
||||||
// don't filter anymore vars and don't let this convsvar be changed
|
// don't filter anymore vars and don't let this convsvar be changed
|
||||||
COM_BufInsertText(va("%s \"%d\"\n", cv_execversion.name, EXECVERSION));
|
COM_BufInsertText(va("%s \"%d\"\n", cv_execversion.name, EXECVERSION));
|
||||||
|
|
@ -648,7 +648,7 @@ void M_FirstLoadConfig(void)
|
||||||
CV_InitFilterVar();
|
CV_InitFilterVar();
|
||||||
|
|
||||||
// load config, make sure those commands doesnt require the screen...
|
// load config, make sure those commands doesnt require the screen...
|
||||||
COM_BufInsertText(va("exec \"%s\"\n", configfile));
|
COM_BufInsertText(va("exec \"%s\" -immediate\n", configfile));
|
||||||
// no COM_BufExecute() needed; that does it right away
|
// no COM_BufExecute() needed; that does it right away
|
||||||
|
|
||||||
// don't filter anymore vars and don't let this convsvar be changed
|
// don't filter anymore vars and don't let this convsvar be changed
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue