From 059c58c94833a05410e77f7d53eed3747991e81c Mon Sep 17 00:00:00 2001 From: Noah Metzger Date: Mon, 6 Feb 2023 18:24:47 -0600 Subject: [PATCH] update master server address patching - 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. --- code/ui/ui_atoms.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/ui/ui_atoms.c b/code/ui/ui_atoms.c index f5cf14c..740c296 100644 --- a/code/ui/ui_atoms.c +++ b/code/ui/ui_atoms.c @@ -1330,14 +1330,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" ) ) { @@ -1346,9 +1352,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" ); } /*