Skip to content
Permalink
Browse files

general: fixed engine client version overwritten in /players

The engine client version was always overwritten by cg_etVersion
See 3c14fb6
  • Loading branch information
rmarquis committed Feb 9, 2020
1 parent a68a441 commit e9489ee11195e6fe771fbebe6534cff38bb7228d
Showing with 9 additions and 1 deletion.
  1. +1 −0 src/client/cl_main.c
  2. +8 −1 src/game/g_cmds_ext.c
@@ -2888,6 +2888,7 @@ void CL_Init(void)
Cvar_Get("name", "ETLegacyPlayer", CVAR_USERINFO | CVAR_ARCHIVE);
Cvar_Get("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE);
Cvar_Get("snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE);
Cvar_Get("etVersion", Q3_VERSION, CVAR_USERINFO | CVAR_ROM);

Cvar_Get("password", "", CVAR_USERINFO);
Cvar_Get("cg_predictItems", "1", CVAR_ARCHIVE);
@@ -465,7 +465,14 @@ void G_players_cmd(gentity_t *ent, unsigned int dwCommand, qboolean fDump)
else
{
trap_GetUserinfo(idnum, userinfo, sizeof(userinfo));
user_version = Info_ValueForKey(userinfo, "cg_etVersion");

user_version = Info_ValueForKey(userinfo, "etVersion");

// no engine version found, check cgame version as a fallback
if (user_version[0] == 0)
{
user_version = Info_ValueForKey(userinfo, "cg_etVersion");
}

Q_strncpyz(version, user_version, sizeof(version));
}

0 comments on commit e9489ee

Please sign in to comment.
You can’t perform that action at this time.