# HG changeset patch # User Adam Kaminski # Date 1638292092 18000 # Tue Nov 30 12:08:12 2021 -0500 # Node ID 58ea7b4323b650978ac6d688add43ce223c870db # Parent ffb075a80926ad749e884c540af014e4529ce8e4 Fixed survival being stuck in the "mission failed" state indefinitely if it was interrupted by the intermission screen. diff -r ffb075a80926 -r 58ea7b4323b6 src/p_setup.cpp --- a/src/p_setup.cpp Sun Nov 28 23:40:25 2021 +0000 +++ b/src/p_setup.cpp Tue Nov 30 12:08:12 2021 -0500 @@ -4680,6 +4680,16 @@ // [BB] We have to reset the state though when this is a new game. if ( ( SURVIVAL_GetState( ) == SURVS_COUNTDOWN ) || ( gameaction == ga_newgame ) ) SURVIVAL_SetState( SURVS_WAITINGFORPLAYERS ); + + // [AK] If we still advanced to the next map when the mission failed, then either the countdown + // if there's still people playing, or reset the state entirely. + if ( SURVIVAL_GetState( ) == SURVS_MISSIONFAILED ) + { + if ( SERVER_CalcNumNonSpectatingPlayers( MAXPLAYERS ) < 1 ) + SURVIVAL_SetState( SURVS_WAITINGFORPLAYERS ); + else + SURVIVAL_StartCountdown(( sv_survivalcountdowntime > 0 ? sv_survivalcountdowntime : 20 ) * TICRATE - 1 ); + } } if ( NETWORK_InClientMode() == false )