# HG changeset patch # User Adam Kaminski # Date 1638079818 18000 # Sun Nov 28 01:10:18 2021 -0500 # Node ID fad5b2cbdc1ee8541fa23c24ee7b9cecf11685be # Parent 4375a36de964d7180bbc5a11b62031969109d443 Fixed a crash when showing the scoreboard on team-based game modes that players earned kills in. diff -r 4375a36de964 -r fad5b2cbdc1e src/g_shared/st_hud.cpp --- a/src/g_shared/st_hud.cpp Sun Nov 28 10:16:12 2021 -0500 +++ b/src/g_shared/st_hud.cpp Sun Nov 28 01:10:18 2021 -0500 @@ -1068,6 +1068,10 @@ scoreName = "frag"; scoreFunction = &TEAM_GetFragCount; } + else + { + return ""; + } // [AK] Get the score of any available teams; for ( ULONG ulTeam = 0; ulTeam < teams.Size( ); ulTeam++ ) diff -r 4375a36de964 -r fad5b2cbdc1e src/scoreboard.cpp --- a/src/scoreboard.cpp Sun Nov 28 10:16:12 2021 -0500 +++ b/src/scoreboard.cpp Sun Nov 28 01:10:18 2021 -0500 @@ -574,7 +574,7 @@ } // Draw the team scores and their relation (tied, red leads, etc). - if ( GAMEMODE_GetCurrentFlags( ) & GMF_PLAYERSONTEAMS ) + if (( GAMEMODE_GetCurrentFlags( ) & GMF_PLAYERSONTEAMS ) && (( GAMEMODE_GetCurrentFlags( ) & GMF_PLAYERSEARNKILLS ) == false )) { if ( gamestate != GS_LEVEL ) g_ulCurYPos += SmallFont->GetHeight( ) + 1;