Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/game/shared/swarm/asw_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ ConVar asw_marine_ff_absorption( "asw_marine_ff_absorption", "1", FCVAR_REPLICAT
ConVar asw_horde_override( "asw_horde_override", "0", FCVAR_REPLICATED, "Forces hordes to spawn", UpdateMatchmakingTagsCallback );
ConVar asw_wanderer_override( "asw_wanderer_override", "0", FCVAR_REPLICATED, "Forces wanderers to spawn", UpdateMatchmakingTagsCallback );
ConVar rd_challenge( "rd_challenge", "0", FCVAR_REPLICATED | FCVAR_DEMO, "Activates a challenge by ID", UpdateMatchmakingTagsCallback );
ConVar rd_challenge_changing( "rd_challenge_changing", "0", FCVAR_GAMEDLL | FCVAR_CHEAT | FCVAR_HIDDEN, "Internally used for diagnostics during challenge transitions" );
ConVar rd_lock_difficulty( "rd_lock_difficulty", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the difficulty level." );
ConVar rd_lock_onslaught( "rd_lock_onslaught", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the onslaught setting." );
ConVar rd_lock_hardcoreff( "rd_lock_hardcoreff", "0", FCVAR_REPLICATED, "If 1, the lobby leader cannot change the hardcore friendly fire setting." );
Expand Down Expand Up @@ -9916,6 +9917,7 @@ void CAlienSwarm::RevertSavedConvars()
void CAlienSwarm::EnableChallenge( const char *szChallengeName )
{
extern ConVar rd_challenge;
extern ConVar rd_challenge_changing;

const RD_Challenge_t *pSummary = ReactiveDropChallenges::GetSummary( szChallengeName );
if ( !pSummary || ( ASWDeathmatchMode() ? !pSummary->AllowDeathmatch : !pSummary->AllowCoop ) )
Expand All @@ -9932,9 +9934,9 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
KeyValues::AutoDelete pKV( "CHALLENGE" );
bool bEnabled = ReactiveDropChallenges::ReadData( pKV, szChallengeName );

rd_challenge.SetValue("");
rd_challenge_changing.SetValue(1);
ResetChallengeConVars();
rd_challenge.SetValue(szChallengeName);
rd_challenge_changing.SetValue(2);

if ( ASWDeathmatchMode() )
{
Expand All @@ -9959,6 +9961,8 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
EnforceWeaponSelectionRules();
}

rd_challenge_changing.SetValue(3);

if ( !bEnabled )
{
szChallengeName = "0";
Expand Down Expand Up @@ -9989,6 +9993,8 @@ void CAlienSwarm::EnableChallenge( const char *szChallengeName )
{
V_strncpy( m_szGameDescription, "Alien Swarm: Reactive Drop", sizeof( m_szGameDescription ) );
}

rd_challenge_changing.SetValue(0);
}

void CAlienSwarm::CheckChallengeConVars()
Expand Down