@@ -1075,17 +1075,17 @@ void MainWindow::OnDrawTeamStats()
1075
1075
if (statsArray[0 ].m_MarkedCount > 0 )
1076
1076
{
1077
1077
// change colors for cooresponding teams
1078
- markedFG = ImGuiDesktop::ScopeGuards::StyleColor (ImGuiCol_PlotHistogram, friendlyBG);
1078
+ ImGuiDesktop::ScopeGuards::StyleColor teamMarkedFG (ImGuiCol_PlotHistogram, friendlyBG);
1079
1079
1080
1080
const auto teamUnmarked = statsArray[0 ].m_PlayerCount - statsArray[0 ].m_MarkedCount ;
1081
- const auto teamUnmarkedActive = statsArray[1 ].m_PlayerCountActive - statsArray[1 ].m_MarkedCountActive ;
1082
- const float teamMarkedRate = statsArray[ 0 ]. m_MarkedCount / static_cast <float >(statsArray[0 ].m_PlayerCount );
1081
+ const auto teamUnmarkedActive = statsArray[0 ].m_PlayerCountActive - statsArray[0 ].m_MarkedCountActive ;
1082
+ const float teamMarkedRate = teamUnmarked / static_cast <float >(statsArray[0 ].m_PlayerCount );
1083
1083
1084
1084
mh::fmtstr<128 > teamMessage;
1085
1085
1086
1086
if (statsArray[0 ].m_MarkedCount != statsArray[0 ].m_MarkedCountActive )
1087
1087
{
1088
- teamMessage.fmt (" MarkedVS (Team): {} ({}) vs {} ({})" , teamUnmarked, teamUnmarkedActive, statsArray[1 ].m_MarkedCount , statsArray[1 ].m_MarkedCountActive );
1088
+ teamMessage.fmt (" MarkedVS (Team): {} ({}) vs {} ({})" , teamUnmarked, teamUnmarkedActive, statsArray[0 ].m_MarkedCount , statsArray[0 ].m_MarkedCountActive );
1089
1089
}
1090
1090
else
1091
1091
{
@@ -1097,16 +1097,16 @@ void MainWindow::OnDrawTeamStats()
1097
1097
1098
1098
if (statsArray[1 ].m_MarkedCount > 0 )
1099
1099
{
1100
- // change colors for cooresponding teams
1101
- markedFG = ImGuiDesktop::ScopeGuards::StyleColor (ImGuiCol_PlotHistogram, enemyBG);
1100
+ // change colors for cooresponding teams
1101
+ ImGuiDesktop::ScopeGuards::StyleColor enemyMarkedFG (ImGuiCol_PlotHistogram, enemyBG);
1102
1102
1103
1103
const auto enemyUnmarked = statsArray[1 ].m_PlayerCount - statsArray[1 ].m_MarkedCount ;
1104
1104
const auto enemyUnmarkedActive = statsArray[1 ].m_PlayerCountActive - statsArray[1 ].m_MarkedCountActive ;
1105
- float enemyMarkedRate = statsArray[ 1 ]. m_MarkedCount / static_cast <float >(statsArray[1 ].m_PlayerCount );
1105
+ float enemyMarkedRate = enemyUnmarked / static_cast <float >(statsArray[1 ].m_PlayerCount );
1106
1106
1107
1107
mh::fmtstr<128 > enemyMessage;
1108
1108
1109
- if (statsArray[0 ].m_MarkedCount != statsArray[1 ].m_MarkedCountActive )
1109
+ if (statsArray[1 ].m_MarkedCount != statsArray[1 ].m_MarkedCountActive )
1110
1110
{
1111
1111
enemyMessage.fmt (" MarkedVS (Enemy): {} ({}) vs {} ({})" , enemyUnmarked, enemyUnmarkedActive, statsArray[1 ].m_MarkedCount , statsArray[1 ].m_MarkedCountActive );
1112
1112
}
0 commit comments