Skip to content

Commit

Permalink
Fix: showUNITCOUNT should only apply to player slots
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Nov 5, 2021
1 parent 8bfc6ae commit 340d5ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void draw3DScene()
const unsigned height = 9; //txtShowFPS.height();
txtShowFPS.render(pie_GetVideoBufferWidth() - width, pie_GetVideoBufferHeight() - height, WZCOL_TEXT_BRIGHT);
}
if (showUNITCOUNT)
if (showUNITCOUNT && selectedPlayer < MAX_PLAYERS)
{
std::string killdiff = astringf("Units: %u lost / %u built / %u killed", missionData.unitsLost, missionData.unitsBuilt, getSelectedPlayerUnitsKilled());
txtUnits.setText(killdiff, font_regular);
Expand Down

0 comments on commit 340d5ec

Please sign in to comment.