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)
{
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();
push[1] = 0.1f;
m_body->applyCentralImpulse( -4000.0f*push );
m_bounce_back_time = 2.0f;
core::stringw msg = _("You need more points\nto enter this challenge!\nCheck the minimap for\navailable challenges.");
std::vector<core::stringw> parts = StringUtils::split(msg, '\n', false);
core::stringw msg = _("You need more points\n"
"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)
{
SFXManager::get()->quickSound("forcefield");
for (unsigned int n = 0; n < parts.size(); n++)
{
World::getWorld()->getRaceGUI()->addMessage(parts[n], NULL, 4.0f,
video::SColor(255, 255,255,255),
true, true);
World::getWorld()->getRaceGUI()
->addMessage(parts[n], NULL, 4.0f,
video::SColor(255, 255,255,255),
true, true);
} // for n<parts.size()
} // if world exist
} // if m_bounce_back_time <= 0.2f