2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

Allow the clients to connect on the server of different game Fixed #975

Client should be use "setinfo _gd <game>"
This commit is contained in:
s1lentq 2023-07-02 03:45:49 +07:00
parent a680f18ee1
commit 0c5ce53666

View File

@ -1112,8 +1112,18 @@ void SV_SendServerinfo_internal(sizebuf_t *msg, client_t *client)
else else
MSG_WriteByte(msg, 0); MSG_WriteByte(msg, 0);
const char *pszGameDir = message;
#ifdef REHLDS_FIXES
// Give the client a chance to connect in to the server with different game
const char *gd = Info_ValueForKey(client->userinfo, "_gd");
if (gd[0])
pszGameDir = gd;
else
#endif
COM_FileBase(com_gamedir, message); COM_FileBase(com_gamedir, message);
MSG_WriteString(msg, message);
MSG_WriteString(msg, pszGameDir);
MSG_WriteString(msg, Cvar_VariableString("hostname")); MSG_WriteString(msg, Cvar_VariableString("hostname"));
MSG_WriteString(msg, g_psv.modelname); MSG_WriteString(msg, g_psv.modelname);