This commit is contained in:
Alayan 2018-11-22 04:29:29 +01:00
parent faf5c440c2
commit f2a9ddaa75

View File

@ -140,17 +140,18 @@ void SpareTireAI::crashed(const AbstractKart *k)
// Nothing happen when two spare tire karts crash each other
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)
{
World::getWorld()->getRaceGUI()->addMessage
(_("You can have at most 3 lives!"), k, 2.0f);
return;
}
// Otherwise increase one life for that kart and unspawn
m_world->addKartLife(k->getWorldKartId());
World::getWorld()->getRaceGUI()->addMessage(_("+1 life."), k, 2.0f);
// Otherwise add one life for that kart
else
{
m_world->addKartLife(k->getWorldKartId());
World::getWorld()->getRaceGUI()->addMessage(_("+1 life."), k, 2.0f);
}
unspawn();
} // crashed