# HG changeset patch # User Adam Kaminski # Date 1622822887 14400 # Fri Jun 04 12:08:07 2021 -0400 # Node ID a89f1e3c381d96724b1bea62126740b6e14b9684 # Parent de258909732b0e26225725545f05f19de2a4837d Changed the wording of the limit strings, made it so the "x monsters left" string only appears if there's actually monsters on the level (unless it's invasion), and added an "x secrets left" string. diff -r de258909732b -r a89f1e3c381d src/scoreboard.cpp --- a/src/scoreboard.cpp Thu Jun 03 10:03:07 2021 -0400 +++ b/src/scoreboard.cpp Fri Jun 04 12:08:07 2021 -0400 @@ -1694,7 +1694,7 @@ if ( condition && remaining > 0 ) { FString limitString; - limitString.Format( "%d %s%s remain%s", static_cast( remaining ), pszUnitName, remaining == 1 ? "" : "s", remaining == 1 ? "s" : "" ); + limitString.Format( "%d %s%s left", static_cast( remaining ), pszUnitName, remaining == 1 ? "" : "s" ); lines.push_back( limitString ); } } @@ -1770,20 +1770,33 @@ lines.push_back( text ); } - // Render the number of monsters left in coop. - if ( ulFlags & GMF_PLAYERSEARNKILLS ) + // [AK] Build the coop strings. + if ( ulFlags & GMF_COOPERATIVE ) { - if ( dmflags2 & DF2_KILL_MONSTERS ) - text.Format( "%d%% remaining", static_cast( lRemaining )); - else - text.Format( "%d monster%s remaining", static_cast( lRemaining ), lRemaining == 1 ? "" : "s" ); + // Render the number of monsters left in coop. + // [AK] Unless we're playing invasion, only do this when there are actually monsters on the level. + if (( ulFlags & GMF_PLAYERSEARNKILLS ) && (( invasion ) || ( level.total_monsters > 0 ))) + { + if (( invasion ) || (( dmflags2 & DF2_KILL_MONSTERS ) == false )) + text.Format( "%d monster%s left", static_cast( lRemaining ), lRemaining == 1 ? "" : "s" ); + else + text.Format( "%d% monsters left", static_cast( lRemaining )); - lines.push_back( text ); + lines.push_back( text ); + } + + // [AK] Render the number of secrets left. + if ( level.total_secrets > 0 ) + { + lRemaining = level.total_secrets - level.found_secrets; + text.Format( "%d secret%s left", static_cast( lRemaining ), lRemaining == 1 ? "" : "s" ); + lines.push_back( text ); + } // [WS] Show the damage factor. if ( sv_coop_damagefactor != 1.0f ) { - text.Format( "Damage factor %.2f", static_cast( sv_coop_damagefactor )); + text.Format( "Damage factor is %.2f", static_cast( sv_coop_damagefactor )); lines.push_back( text ); } }