Browse Source

engine: cfgscript: don't let scr vars overwrite existing variables

we don't use them for storing settings anyway
only for reference in UI
pull/2/head
Alibek Omarov 4 years ago
parent
commit
f2ab4c0d0e
  1. 3
      engine/common/cfgscript.c

3
engine/common/cfgscript.c

@ -292,7 +292,8 @@ int CSCR_WriteGameCVars( file_t *cfg, const char *scriptfilename ) @@ -292,7 +292,8 @@ int CSCR_WriteGameCVars( file_t *cfg, const char *scriptfilename )
static void CSCR_RegisterVariable( scrvardef_t *var, void *unused )
{
Cvar_Get( var->name, var->value, var->flags|FCVAR_TEMPORARY, var->desc );
if( !Cvar_FindVar( var->name ))
Cvar_Get( var->name, var->value, var->flags|FCVAR_TEMPORARY, var->desc );
}
/*

Loading…
Cancel
Save