Fix getting servers from and being listed on id's q3 master server

Use q3 master protocol when com_gamename is Quake3Arena (the default), otherwise use dpmaster protocol.
This commit is contained in:
Zack Middleton 2013-07-07 16:08:58 -05:00
parent 608e852ac6
commit 6b13806066
3 changed files with 11 additions and 0 deletions

View file

@ -4145,6 +4145,9 @@ void CL_GlobalServers_f( void ) {
com_gamename->string, Cmd_Argv(2));
}
}
else if ( !Q_stricmp( com_gamename->string, LEGACY_MASTER_GAMENAME ) )
Com_sprintf(command, sizeof(command), "getservers %s",
Cmd_Argv(2));
else
Com_sprintf(command, sizeof(command), "getservers %s %s",
com_gamename->string, Cmd_Argv(2));

View file

@ -51,6 +51,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// Heartbeat for dpmaster protocol. You shouldn't change this unless you know what you're doing
#define HEARTBEAT_FOR_MASTER "DarkPlaces"
// When com_gamename is LEGACY_MASTER_GAMENAME, use quake3 master protocol.
// You shouldn't change this unless you know what you're doing
#define LEGACY_MASTER_GAMENAME "Quake3Arena"
#define LEGACY_HEARTBEAT_FOR_MASTER "QuakeArena-1"
#define BASETA "missionpack"
#ifndef PRODUCT_VERSION

View file

@ -252,6 +252,9 @@ void SV_MasterHeartbeat(const char *message)
if ( svs.time < svs.nextHeartbeatTime )
return;
if ( !Q_stricmp( com_gamename->string, LEGACY_MASTER_GAMENAME ) )
message = LEGACY_HEARTBEAT_FOR_MASTER;
svs.nextHeartbeatTime = svs.time + HEARTBEAT_MSEC;
// send to group masters