Skip to content

Commit

Permalink
update master server address patching
Browse files Browse the repository at this point in the history
- Only apply modifications to 1.20 and 1.37 clients to avoid unwanted changes on newer clients.
- Tweak server order now that Raven master is currently back online.
  • Loading branch information
Chomenor committed Feb 7, 2023
1 parent 85e7aa3 commit 0398972
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions code/ui/ui_atoms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,14 +1439,20 @@ static void UI_InsertMaster( char *address ) {
=================
UI_UpdateMasters
Attempt to add some modern master server addresses. This is a fix for old clients which may not
have any working master servers loaded by default.
Update master server addresses on old clients with more reliable community masters.
=================
*/
static void UI_UpdateMasters( void ) {
char cvarBuffer[256];

// replace the default raven master from the first slot, since it is currently offline
// only make changes on certain old clients
trap_Cvar_VariableStringBuffer( "version", cvarBuffer, sizeof( cvarBuffer ) );
if ( strcmp( cvarBuffer, "ST:V HM v1.20 win-x86 Apr 17 2001" ) &&
strcmp( cvarBuffer, "ioST:V HM v1.37 win_msvc-x86 Nov 13 2006" ) ) {
return;
}

// replace the default raven master from the first slot, since it is relatively unreliable
// it will be restored in a lower priority slot below, if free slots are available
trap_Cvar_VariableStringBuffer( "sv_master1", cvarBuffer, sizeof( cvarBuffer ) );
if ( UI_CompareMasterAddress( cvarBuffer, "master.stef1.ravensoft.com" ) ) {
Expand All @@ -1455,9 +1461,9 @@ static void UI_UpdateMasters( void ) {

// load the following masters in any free slot
UI_InsertMaster( "master.stvef.org" );
UI_InsertMaster( "efmaster.tjps.eu" );
UI_InsertMaster( "master.stef1.daggolin.de" );
UI_InsertMaster( "master.stef1.ravensoft.com" );
UI_InsertMaster( "master.stef1.daggolin.de" );
UI_InsertMaster( "efmaster.tjps.eu" );
}

/*
Expand Down

0 comments on commit 0398972

Please sign in to comment.