Print message only if a kart is hit.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4923 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4a2e7d57b1
commit
455393e966
@ -155,12 +155,15 @@ void Plunger::hit(Kart *kart, PhysicalObject *obj)
|
||||
// so in battle mode, always hide view
|
||||
if( m_reverse_mode || race_manager->isBattleMode(race_manager->getMinorMode()) )
|
||||
{
|
||||
if(kart) kart->blockViewWithPlunger();
|
||||
if(kart) {
|
||||
kart->blockViewWithPlunger();
|
||||
|
||||
hit_message += StringUtils::insertValues(_("%s gets a fancy mask from %s"),
|
||||
kart->getName().c_str(),
|
||||
m_owner->getName().c_str()
|
||||
).c_str();
|
||||
hit_message += StringUtils::insertValues(_("%s gets a fancy mask from %s"),
|
||||
kart->getName().c_str(),
|
||||
m_owner->getName().c_str()
|
||||
).c_str();
|
||||
gui->addMessage(hit_message, NULL, 3.0f, 40, video::SColor(255, 210, 50, 50));
|
||||
}
|
||||
|
||||
m_keep_alive = 0;
|
||||
// Make this object invisible by placing it faaar down. Not that if this
|
||||
@ -169,8 +172,6 @@ void Plunger::hit(Kart *kart, PhysicalObject *obj)
|
||||
Vec3 hell(0, 0, -10000);
|
||||
getNode()->setPosition(hell.toIrrVector());
|
||||
World::getWorld()->getPhysics()->removeBody(getBody());
|
||||
|
||||
gui->addMessage(hit_message, NULL, 3.0f, 40, video::SColor(255, 210, 50, 50));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user