mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-28 06:52:35 +00:00
Fix bug where Com_StartupVariable would set CVAR_USER_CREATED on already existing cvars
This commit is contained in:
parent
7ca1dc6f8b
commit
e5cec15fbf
1 changed files with 7 additions and 6 deletions
|
@ -451,7 +451,6 @@ be after execing the config and default.
|
||||||
void Com_StartupVariable( const char *match ) {
|
void Com_StartupVariable( const char *match ) {
|
||||||
int i;
|
int i;
|
||||||
char *s;
|
char *s;
|
||||||
cvar_t *cv;
|
|
||||||
|
|
||||||
for (i=0 ; i < com_numConsoleLines ; i++) {
|
for (i=0 ; i < com_numConsoleLines ; i++) {
|
||||||
Cmd_TokenizeString( com_consoleLines[i] );
|
Cmd_TokenizeString( com_consoleLines[i] );
|
||||||
|
@ -460,11 +459,13 @@ void Com_StartupVariable( const char *match ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
s = Cmd_Argv(1);
|
s = Cmd_Argv(1);
|
||||||
if ( !match || !strcmp( s, match ) ) {
|
|
||||||
Cvar_Set( s, Cmd_Argv(2) );
|
if(!match || !strcmp(s, match))
|
||||||
cv = Cvar_Get( s, "", 0 );
|
{
|
||||||
cv->flags |= CVAR_USER_CREATED;
|
if(Cvar_Flags(s) == CVAR_NONEXISTENT)
|
||||||
// com_consoleLines[i] = 0;
|
Cvar_Get(s, Cmd_Argv(2), CVAR_USER_CREATED);
|
||||||
|
else
|
||||||
|
Cvar_Set(s, Cmd_Argv(2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue