Skip to content

Commit

Permalink
Allow the clients to connect on the server of different game Fixed #975
Browse files Browse the repository at this point in the history
Client should be use "setinfo _gd <game>"
  • Loading branch information
s1lentq committed Jul 1, 2023
1 parent a680f18 commit 0c5ce53
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions rehlds/engine/sv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,18 @@ void SV_SendServerinfo_internal(sizebuf_t *msg, client_t *client)
else
MSG_WriteByte(msg, 0);

COM_FileBase(com_gamedir, message);
MSG_WriteString(msg, message);
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);

MSG_WriteString(msg, pszGameDir);
MSG_WriteString(msg, Cvar_VariableString("hostname"));
MSG_WriteString(msg, g_psv.modelname);

Expand Down

4 comments on commit 0c5ce53

@cris840
Copy link

@cris840 cris840 commented on 0c5ce53 Jul 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but Steam Auth needs to be fixed

@Nord1cWarr1or
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cris840 why

@cris840
Copy link

@cris840 cris840 commented on 0c5ce53 Jul 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cris840 why

because when entering a server you get the STEAM validation rejected message and if you have a meeting you will get a STEAM ID LAN status

@myosotis10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works, but Steam Auth needs to be fixed

where should i type this thing bro?

Please sign in to comment.