This commit is contained in:
Alayan 2018-11-13 16:11:28 +01:00
parent 5db7358921
commit e56a9bdf58
2 changed files with 14 additions and 12 deletions

View File

@ -170,7 +170,7 @@
<near-ground distance="2"/> <near-ground distance="2"/>
<!-- How long the end animation will be shown. --> <!-- How long the end animation will be shown. -->
<delay-finish time="0.5"/> <delay-finish time="1.0"/>
<!-- How long the music credits are shown. --> <!-- How long the music credits are shown. -->
<credits music="10"/> <credits music="10"/>

View File

@ -993,17 +993,19 @@ void Kart::finishedRace(float time, bool from_server)
RaceGUIBase* m = World::getWorld()->getRaceGUI(); RaceGUIBase* m = World::getWorld()->getRaceGUI();
if (m) if (m)
{ {
if (race_manager-> bool won_the_race = false;
getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER && unsigned int win_position = 1;
getPosition() == 2)
m->addMessage(_("You won the race!"), this, 2.0f); if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER)
else if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_NORMAL_RACE || win_position = 2;
race_manager->getMinorMode() == RaceManager::MINOR_MODE_TIME_TRIAL)
{ if (getPosition() == (int)win_position &&
m->addMessage((getPosition() == 1 ? World::getWorld()->getNumKarts() > win_position)
_("You won the race!") : _("You finished the race!")) , won_the_race = true;
this, 2.0f);
} m->addMessage((won_the_race ?
_("You won the race!") : _("You finished the race!")) ,
this, 2.0f, video::SColor(255, 255, 255, 255), true, true, true);
} }
} }