# HG changeset patch # User Adam Kaminski # Date 1622822887 14400 # Fri Jun 04 12:08:07 2021 -0400 # Node ID 5a2e4ecff552548a68dedb29d8732a19aaad628f # Parent 0e78eea8b5b9b02332868a87c3cf723043b6f8d7 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 0e78eea8b5b9 -r 5a2e4ecff552 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", lRemaining, lRemaining == 1 ? "" : "s" ); + else + text.Format( "%d% monsters left", 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", 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 ); } }