This commit is contained in:
Lois Doyenard 2021-12-08 11:28:28 +01:00
parent 087892e183
commit be16d24170

View File

@ -1960,14 +1960,20 @@ void RaceResultGUI::unload()
// display difficulty // display difficulty
core::stringw difficulty_name = core::stringw difficulty_name =
RaceManager::get()->getDifficultyName(RaceManager::get()->getDifficulty()); RaceManager::get()->getDifficultyName(RaceManager::get()->getDifficulty());
core::stringw difficulty_one;
core::stringw difficulty_two; core::stringw difficulty_two;
if (RaceManager::get()->hasGhostKarts() && ReplayPlay::get()->isSecondReplayEnabled()) if (RaceManager::get()->hasGhostKarts() && ReplayPlay::get()->isSecondReplayEnabled())
{ {
unsigned idw = ReplayPlay::get()->getCurrentReplayFileIndex();
unsigned idx = ReplayPlay::get()->getSecondReplayFileIndex(); unsigned idx = ReplayPlay::get()->getSecondReplayFileIndex();
const ReplayPlay::ReplayData& rd = ReplayPlay::get()->getReplayData(idx); const ReplayPlay::ReplayData& rd1 = ReplayPlay::get()->getReplayData(idw);
difficulty_two = RaceManager::get()->getDifficultyName((RaceManager::Difficulty)rd.m_difficulty); const ReplayPlay::ReplayData& rd2 = ReplayPlay::get()->getReplayData(idx);
if (difficulty_name != difficulty_two) difficulty_one = RaceManager::get()->getDifficultyName((RaceManager::Difficulty)rd1.m_difficulty);
difficulty_name += core::stringw(L"/") + difficulty_two; difficulty_two = RaceManager::get()->getDifficultyName((RaceManager::Difficulty)rd2.m_difficulty);
if (difficulty_one != difficulty_two)
difficulty_name = difficulty_one +" / "+ difficulty_two;
else
difficulty_name = difficulty_one;
} }
core::stringw difficulty_string = _("Difficulty: %s", difficulty_name); core::stringw difficulty_string = _("Difficulty: %s", difficulty_name);
current_y += int(m_distance_between_meta_rows * 0.8f); current_y += int(m_distance_between_meta_rows * 0.8f);