Fix #3549
This commit is contained in:
parent
5db7358921
commit
e56a9bdf58
@ -170,7 +170,7 @@
|
||||
<near-ground distance="2"/>
|
||||
|
||||
<!-- 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. -->
|
||||
<credits music="10"/>
|
||||
|
@ -993,17 +993,19 @@ void Kart::finishedRace(float time, bool from_server)
|
||||
RaceGUIBase* m = World::getWorld()->getRaceGUI();
|
||||
if (m)
|
||||
{
|
||||
if (race_manager->
|
||||
getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER &&
|
||||
getPosition() == 2)
|
||||
m->addMessage(_("You won the race!"), this, 2.0f);
|
||||
else if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_NORMAL_RACE ||
|
||||
race_manager->getMinorMode() == RaceManager::MINOR_MODE_TIME_TRIAL)
|
||||
{
|
||||
m->addMessage((getPosition() == 1 ?
|
||||
bool won_the_race = false;
|
||||
unsigned int win_position = 1;
|
||||
|
||||
if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER)
|
||||
win_position = 2;
|
||||
|
||||
if (getPosition() == (int)win_position &&
|
||||
World::getWorld()->getNumKarts() > win_position)
|
||||
won_the_race = true;
|
||||
|
||||
m->addMessage((won_the_race ?
|
||||
_("You won the race!") : _("You finished the race!")) ,
|
||||
this, 2.0f);
|
||||
}
|
||||
this, 2.0f, video::SColor(255, 255, 255, 255), true, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user