in battle mode, disable pull-back and akways use block-view, since opullign back does'nt make sense in a battle
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2796 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4ff60bff67
commit
94c99349ea
@ -81,7 +81,9 @@ Plunger::Plunger(Kart *kart) : Flyable(kart, POWERUP_PLUNGER)
|
|||||||
new btCylinderShape(0.5f*m_extend), 0.0f /* gravity */, false /* rotates */, m_reverse_mode, &trans );
|
new btCylinderShape(0.5f*m_extend), 0.0f /* gravity */, false /* rotates */, m_reverse_mode, &trans );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_reverse_mode)
|
// pulling back makes no sense in battle mode, since this mode is not a race.
|
||||||
|
// so in battle mode, always hide view
|
||||||
|
if( m_reverse_mode || race_manager->isBattleMode(race_manager->getMinorMode()) )
|
||||||
m_rubber_band = NULL;
|
m_rubber_band = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -119,13 +121,13 @@ void Plunger::update(float dt)
|
|||||||
m->removeAllKids();
|
m->removeAllKids();
|
||||||
scene->remove(m);
|
scene->remove(m);
|
||||||
}
|
}
|
||||||
if(!m_reverse_mode) m_rubber_band->update(dt);
|
if(m_rubber_band != NULL) m_rubber_band->update(dt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Else: update the flyable and rubber band
|
// Else: update the flyable and rubber band
|
||||||
Flyable::update(dt);
|
Flyable::update(dt);
|
||||||
if(!m_reverse_mode) m_rubber_band->update(dt);
|
if(m_rubber_band != NULL) m_rubber_band->update(dt);
|
||||||
|
|
||||||
if(getHoT()==Track::NOHIT) return;
|
if(getHoT()==Track::NOHIT) return;
|
||||||
float hat = getTrans().getOrigin().getZ()-getHoT();
|
float hat = getTrans().getOrigin().getZ()-getHoT();
|
||||||
@ -153,12 +155,11 @@ void Plunger::hit(Kart *kart, MovingPhysics *mp)
|
|||||||
{
|
{
|
||||||
if(isOwnerImmunity(kart)) return;
|
if(isOwnerImmunity(kart)) return;
|
||||||
|
|
||||||
if(m_reverse_mode)
|
// pulling back makes no sense in battle mode, since this mode is not a race.
|
||||||
|
// so in battle mode, always hide view
|
||||||
|
if( m_reverse_mode || race_manager->isBattleMode(race_manager->getMinorMode()) )
|
||||||
{
|
{
|
||||||
if(kart)
|
if(kart) kart->blockViewWithPlunger();
|
||||||
{
|
|
||||||
kart->blockViewWithPlunger();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_keep_alive = 0;
|
m_keep_alive = 0;
|
||||||
// Make this object invisible by placing it faaar down. Not that if this
|
// Make this object invisible by placing it faaar down. Not that if this
|
||||||
|
Loading…
Reference in New Issue
Block a user