Skip to content

Commit 245c065

Browse files
committed
adds a variable that allows monitoring challenge changes and transitions
1 parent b5a35b2 commit 245c065

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/game/shared/swarm/asw_gamerules.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ ConVar asw_marine_ff_absorption( "asw_marine_ff_absorption", "1", FCVAR_REPLICAT
609609
ConVar asw_horde_override( "asw_horde_override", "0", FCVAR_REPLICATED, "Forces hordes to spawn", UpdateMatchmakingTagsCallback );
610610
ConVar asw_wanderer_override( "asw_wanderer_override", "0", FCVAR_REPLICATED, "Forces wanderers to spawn", UpdateMatchmakingTagsCallback );
611611
ConVar rd_challenge( "rd_challenge", "0", FCVAR_REPLICATED | FCVAR_DEMO, "Activates a challenge by ID", UpdateMatchmakingTagsCallback );
612+
ConVar rd_challenge_changing( "rd_challenge_changing", "0", FCVAR_GAMEDLL | FCVAR_CHEAT | FCVAR_HIDDEN, "Internally used for diagnostics during challenge transitions" );
612613
ConVar rd_lock_difficulty( "rd_lock_difficulty", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the difficulty level." );
613614
ConVar rd_lock_onslaught( "rd_lock_onslaught", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the onslaught setting." );
614615
ConVar rd_lock_hardcoreff( "rd_lock_hardcoreff", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the hardcore friendly fire setting." );
@@ -9916,6 +9917,7 @@ void CAlienSwarm::RevertSavedConvars()
99169917
void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99179918
{
99189919
extern ConVar rd_challenge;
9920+
extern ConVar rd_challenge_changing;
99199921

99209922
const RD_Challenge_t *pSummary = ReactiveDropChallenges::GetSummary( szChallengeName );
99219923
if ( !pSummary || ( ASWDeathmatchMode() ? !pSummary->AllowDeathmatch : !pSummary->AllowCoop ) )
@@ -9932,6 +9934,7 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99329934
KeyValues::AutoDelete pKV( "CHALLENGE" );
99339935
bool bEnabled = ReactiveDropChallenges::ReadData( pKV, szChallengeName );
99349936

9937+
rd_challenge_changing.SetValue(true);
99359938
ResetChallengeConVars();
99369939
if ( ASWDeathmatchMode() )
99379940
{
@@ -9972,7 +9975,6 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99729975
// if rd_max_marines changed we need to update marines limits using SetMaxMarines
99739976
SetMaxMarines();
99749977
EnforceMaxMarines();
9975-
rd_challenge.SetValue( szChallengeName );
99769978
OnSkillLevelChanged( m_iSkillLevel );
99779979

99789980
if ( V_strcmp( rd_challenge.GetString(), "0" ) )
@@ -9987,6 +9989,8 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
99879989
{
99889990
V_strncpy( m_szGameDescription, "Alien Swarm: Reactive Drop", sizeof( m_szGameDescription ) );
99899991
}
9992+
9993+
rd_challenge_changing.SetValue(false);
99909994
}
99919995

99929996
void CAlienSwarm::CheckChallengeConVars()

0 commit comments

Comments
 (0)