halflife
halflife copied to clipboard
The engine incorrectly sets the value for the "game:server_name" key in Rich Presence
The engine always gets the server name from the local hostname
variable, even if the client connects to an external game server:
CSteam3Client::UpdateRichPresence()
{
...
v31 = Cvar_VariableString("hostname");
v30(v29, "game:server_name", v31);
...
}
I believe that it would be more correct to get the name of the game server from the svc_serverinfo
message, from this variable:
void __usercall CL_ParseServerInfo(int a1@<ebx>, char *a2@<ebp>, int a3@<edi>, __m128i a4@<xmm4>)
{
...
v20 = MSG_ReadString();
Con_DPrintf("Remote host: %s\n", v20);
...
}