Minor cosmetic changes only.

This commit is contained in:
hiker 2014-10-23 22:25:23 +11:00
parent 6e79f90166
commit f70687a00b

View File

@ -1835,26 +1835,33 @@ void Kart::crashed(const Material *m, const Vec3 &normal)
} }
else if (m->getCollisionReaction() == Material::PUSH_BACK) else if (m->getCollisionReaction() == Material::PUSH_BACK)
{ {
if (m_bounce_back_time <= 0.2f) // this variable is sometimes set to 0.1 somewhere else // This variable is set to 0.2 in case of a kart-terrain collision
if (m_bounce_back_time <= 0.2f)
{ {
btVector3 push = m_body->getLinearVelocity().normalized(); btVector3 push = m_body->getLinearVelocity().normalized();
push[1] = 0.1f; push[1] = 0.1f;
m_body->applyCentralImpulse( -4000.0f*push ); m_body->applyCentralImpulse( -4000.0f*push );
m_bounce_back_time = 2.0f; m_bounce_back_time = 2.0f;
core::stringw msg = _("You need more points\nto enter this challenge!\nCheck the minimap for\navailable challenges."); core::stringw msg = _("You need more points\n"
std::vector<core::stringw> parts = StringUtils::split(msg, '\n', false); "to enter this challenge!\n"
"Check the minimap for\n"
"available challenges.");
std::vector<core::stringw> parts =
StringUtils::split(msg, '\n', false);
// For now, until we have scripting, special-case the overworld... (TODO) // For now, until we have scripting, special-case
// the overworld... (TODO)
if (dynamic_cast<OverWorld*>(World::getWorld()) != NULL) if (dynamic_cast<OverWorld*>(World::getWorld()) != NULL)
{ {
SFXManager::get()->quickSound("forcefield"); SFXManager::get()->quickSound("forcefield");
for (unsigned int n = 0; n < parts.size(); n++) for (unsigned int n = 0; n < parts.size(); n++)
{ {
World::getWorld()->getRaceGUI()->addMessage(parts[n], NULL, 4.0f, World::getWorld()->getRaceGUI()
video::SColor(255, 255,255,255), ->addMessage(parts[n], NULL, 4.0f,
true, true); video::SColor(255, 255,255,255),
true, true);
} // for n<parts.size() } // for n<parts.size()
} // if world exist } // if world exist
} // if m_bounce_back_time <= 0.2f } // if m_bounce_back_time <= 0.2f