Don't register fs_game cvar everywhere just to get the value
This commit is contained in:
1 parent
3a6af1bc48
commit
adef4e6c9e
4 files changed
+17
-26
No files matched your search
+6
-6
@@ -639,9 +639,9 @@ CLUI_GetCDKey
|
||||
*/
|
||||
static void CLUI_GetCDKey( char *buf, int buflen ) {
|
||||
#ifndef STANDALONE
|
||||
cvar_t *fs;
|
||||
fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
|
||||
if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) {
|
||||
const char *gamedir;
|
||||
gamedir = Cvar_VariableString( "fs_game" );
|
||||
if (UI_usesUniqueCDKey() && gamedir[0] != 0) {
|
||||
Com_Memcpy( buf, &cl_cdkey[16], 16);
|
||||
buf[16] = 0;
|
||||
} else {
|
||||
@@ -661,9 +661,9 @@ CLUI_SetCDKey
|
||||
*/
|
||||
#ifndef STANDALONE
|
||||
static void CLUI_SetCDKey( char *buf ) {
|
||||
cvar_t *fs;
|
||||
fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
|
||||
if (UI_usesUniqueCDKey() && fs && fs->string[0] != 0) {
|
||||
const char *gamedir;
|
||||
gamedir = Cvar_VariableString( "fs_game" );
|
||||
if (UI_usesUniqueCDKey() && gamedir[0] != 0) {
|
||||
Com_Memcpy( &cl_cdkey[16], buf, 16 );
|
||||
cl_cdkey[32] = 0;
|
||||
// set the flag so the fle will be written at the next opportunity
|
||||
|
||||
Reference in new issue
Block a user