Fix #3604
This commit is contained in:
parent
faf5c440c2
commit
f2a9ddaa75
@ -140,17 +140,18 @@ void SpareTireAI::crashed(const AbstractKart *k)
|
|||||||
// Nothing happen when two spare tire karts crash each other
|
// Nothing happen when two spare tire karts crash each other
|
||||||
if (dynamic_cast<const SpareTireAI*>(k->getController()) != NULL) return;
|
if (dynamic_cast<const SpareTireAI*>(k->getController()) != NULL) return;
|
||||||
|
|
||||||
// Tell player that they have max 3 lives only
|
// Tell players that they can have at most 3 lives
|
||||||
if (m_world->getKartLife(k->getWorldKartId()) == 3)
|
if (m_world->getKartLife(k->getWorldKartId()) == 3)
|
||||||
{
|
{
|
||||||
World::getWorld()->getRaceGUI()->addMessage
|
World::getWorld()->getRaceGUI()->addMessage
|
||||||
(_("You can have at most 3 lives!"), k, 2.0f);
|
(_("You can have at most 3 lives!"), k, 2.0f);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
// Otherwise add one life for that kart
|
||||||
// Otherwise increase one life for that kart and unspawn
|
else
|
||||||
m_world->addKartLife(k->getWorldKartId());
|
{
|
||||||
World::getWorld()->getRaceGUI()->addMessage(_("+1 life."), k, 2.0f);
|
m_world->addKartLife(k->getWorldKartId());
|
||||||
|
World::getWorld()->getRaceGUI()->addMessage(_("+1 life."), k, 2.0f);
|
||||||
|
}
|
||||||
unspawn();
|
unspawn();
|
||||||
|
|
||||||
} // crashed
|
} // crashed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user