From dcd76ddc91154c1230b1ff26cc1fe44a5a9933c4 Mon Sep 17 00:00:00 2001 From: Mithrand Date: Fri, 1 Aug 2025 15:59:22 +0200 Subject: [PATCH] set the challenge name before setting convars, this fixes log order when external plugins are used. --- src/game/shared/swarm/asw_gamerules.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/shared/swarm/asw_gamerules.cpp b/src/game/shared/swarm/asw_gamerules.cpp index f79554a21..b436e2c49 100644 --- a/src/game/shared/swarm/asw_gamerules.cpp +++ b/src/game/shared/swarm/asw_gamerules.cpp @@ -9932,7 +9932,10 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName ) KeyValues::AutoDelete pKV( "CHALLENGE" ); bool bEnabled = ReactiveDropChallenges::ReadData( pKV, szChallengeName ); + rd_challenge.SetValue(""); ResetChallengeConVars(); + rd_challenge.SetValue(szChallengeName); + if ( ASWDeathmatchMode() ) { ASWDeathmatchMode()->ApplyDeathmatchConVars(); @@ -9972,7 +9975,6 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName ) // if rd_max_marines changed we need to update marines limits using SetMaxMarines SetMaxMarines(); EnforceMaxMarines(); - rd_challenge.SetValue( szChallengeName ); OnSkillLevelChanged( m_iSkillLevel ); if ( V_strcmp( rd_challenge.GetString(), "0" ) )