mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
fix defeat icon
This commit is contained in:
parent
5743f151a1
commit
4796f46c24
@ -99,6 +99,7 @@ TData CStatisticScreen::extractData(StatisticDataSet stat, std::function<float(S
|
|||||||
PlayerColor tmpColor = PlayerColor::NEUTRAL;
|
PlayerColor tmpColor = PlayerColor::NEUTRAL;
|
||||||
std::vector<float> tmpColorSet;
|
std::vector<float> tmpColorSet;
|
||||||
TData plotData;
|
TData plotData;
|
||||||
|
EPlayerStatus statusLastRound = EPlayerStatus::INGAME;
|
||||||
for(auto & val : tmpData)
|
for(auto & val : tmpData)
|
||||||
{
|
{
|
||||||
if(tmpColor != val.player)
|
if(tmpColor != val.player)
|
||||||
@ -111,8 +112,9 @@ TData CStatisticScreen::extractData(StatisticDataSet stat, std::function<float(S
|
|||||||
|
|
||||||
tmpColor = val.player;
|
tmpColor = val.player;
|
||||||
}
|
}
|
||||||
if(val.status == EPlayerStatus::INGAME)
|
if(val.status == EPlayerStatus::INGAME || (statusLastRound == EPlayerStatus::INGAME && val.status == EPlayerStatus::LOSER))
|
||||||
tmpColorSet.push_back(selector(val));
|
tmpColorSet.push_back(selector(val));
|
||||||
|
statusLastRound = val.status; //to keep at least one dataset after loose
|
||||||
}
|
}
|
||||||
if(tmpColorSet.size())
|
if(tmpColorSet.size())
|
||||||
plotData.push_back({graphics->playerColors[tmpColor.getNum()], std::vector<float>(tmpColorSet)});
|
plotData.push_back({graphics->playerColors[tmpColor.getNum()], std::vector<float>(tmpColorSet)});
|
||||||
|
Loading…
Reference in New Issue
Block a user