|
|
@ -681,18 +681,18 @@ void Cvar_DirectSet( convar_t *var, const char *value ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const char *pszValue; |
|
|
|
const char *pszValue; |
|
|
|
|
|
|
|
|
|
|
|
if( !var ) return; // ???
|
|
|
|
if( unlikely( !var )) return; // ???
|
|
|
|
|
|
|
|
|
|
|
|
// lookup for registration
|
|
|
|
// lookup for registration
|
|
|
|
if( CVAR_CHECK_SENTINEL( var ) || ( var->next == NULL && !FBitSet( var->flags, FCVAR_EXTENDED|FCVAR_ALLOCATED ))) |
|
|
|
if( unlikely( CVAR_CHECK_SENTINEL( var ) || ( var->next == NULL && !FBitSet( var->flags, FCVAR_EXTENDED|FCVAR_ALLOCATED )))) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// need to registering cvar fisrt
|
|
|
|
// need to registering cvar fisrt
|
|
|
|
Cvar_RegisterVariable( var ); // ok, register it
|
|
|
|
Cvar_RegisterVariable( var ); // ok, register it
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// lookup for registration again
|
|
|
|
// lookup for registration again
|
|
|
|
if( var != Cvar_FindVar( var->name )) |
|
|
|
if( var != Cvar_FindVar( var->name )) |
|
|
|
return; // how this possible?
|
|
|
|
return; // how this possible?
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if( FBitSet( var->flags, FCVAR_READ_ONLY )) |
|
|
|
if( FBitSet( var->flags, FCVAR_READ_ONLY )) |
|
|
|
{ |
|
|
|
{ |
|
|
|