1) remove plunger model when it hits a kart (backwards) 2) tweaked duration of plunger blocking view to be less of a punition

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2789 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2008-12-26 20:54:23 +00:00
parent c403bc0037
commit fe49e9f8cf
2 changed files with 9 additions and 12 deletions

View File

@ -161,17 +161,14 @@ void Plunger::hit(Kart *kart, MovingPhysics *mp)
{
kart->blockViewWithPlunger();
}
else
{
m_keep_alive = 0;
// Make this object invisible by placing it faaar down. Not that if this
// objects is simply removed from the scene graph, it might be auto-deleted
// because the ref count reaches zero.
Vec3 hell(0, 0, -10000);
getModelTransform()->setTransform(hell.toFloat());
RaceManager::getWorld()->getPhysics()->removeBody(getBody());
//hitTrack();
}
m_keep_alive = 0;
// Make this object invisible by placing it faaar down. Not that if this
// objects is simply removed from the scene graph, it might be auto-deleted
// because the ref count reaches zero.
Vec3 hell(0, 0, -10000);
getModelTransform()->setTransform(hell.toFloat());
RaceManager::getWorld()->getPhysics()->removeBody(getBody());
}
else
{

View File

@ -148,7 +148,7 @@ public:
bool hasViewBlockedByPlunger() const
{ return m_view_blocked_by_plunger > 0; }
void blockViewWithPlunger() { m_view_blocked_by_plunger = 20; }
void blockViewWithPlunger() { m_view_blocked_by_plunger = 15; }
/**
returns a bullet transform object located at the kart's position