Skip to content

Commit 06fafb1

Browse files
committed
Revert "fix a bug where the challenge is reset after asw_mission_restart"
This reverts commit bd0ea0a.
1 parent bd0ea0a commit 06fafb1

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/game/shared/swarm/asw_gamerules.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9932,11 +9932,9 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99329932
KeyValues::AutoDelete pKV( "CHALLENGE" );
99339933
bool bEnabled = ReactiveDropChallenges::ReadData( pKV, szChallengeName );
99349934

9935-
if ( bChanged ) {
9936-
rd_challenge.SetValue("0");
9937-
ResetChallengeConVars();
9938-
rd_challenge.SetValue(szChallengeName);
9939-
}
9935+
rd_challenge.SetValue("");
9936+
ResetChallengeConVars();
9937+
rd_challenge.SetValue(szChallengeName);
99409938

99419939
if ( ASWDeathmatchMode() )
99429940
{
@@ -9958,6 +9956,7 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99589956
if ( bEnabled )
99599957
{
99609958
ApplyChallengeConVars( pKV );
9959+
EnforceWeaponSelectionRules();
99619960
}
99629961

99639962
if ( !bEnabled )
@@ -9976,7 +9975,6 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99769975
// if rd_max_marines changed we need to update marines limits using SetMaxMarines
99779976
SetMaxMarines();
99789977
EnforceMaxMarines();
9979-
EnforceWeaponSelectionRules();
99809978
OnSkillLevelChanged( m_iSkillLevel );
99819979

99829980
if ( V_strcmp( rd_challenge.GetString(), "0" ) )

0 commit comments

Comments
 (0)