Don't register fs_game cvar everywhere just to get the value

This commit is contained in:
Zack Middleton 2018-01-21 02:38:08 -06:00
parent 3a6af1bc48
commit adef4e6c9e
4 changed files with 17 additions and 26 deletions

View file

@ -176,15 +176,13 @@ void SV_GetChallenge(netadr_t from)
else
{
// otherwise send their ip to the authorize server
cvar_t *fs;
char game[1024];
const char *game;
Com_DPrintf( "sending getIpAuthorize for %s\n", NET_AdrToString( from ));
strcpy(game, BASEGAME);
fs = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
if (fs && fs->string[0] != 0) {
strcpy(game, fs->string);
game = Cvar_VariableString( "fs_game" );
if (game[0] == 0) {
game = BASEGAME;
}
// the 0 is for backwards compatibility with obsolete sv_allowanonymous flags