Explosion now don't affect the kart that shot the rocket (unless
it's a direct hit). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1766 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b70006b09b
commit
a76c929033
@ -227,9 +227,15 @@ void Flyable::explode(Kart *kart_hit, MovingPhysics* moving_physics)
|
||||
for ( unsigned int i = 0 ; i < race_manager->getNumKarts() ; i++ )
|
||||
{
|
||||
Kart *kart = world->getKart(i);
|
||||
// handle the actual explosion. Set a flag it if was a direct hit.
|
||||
// Handle the actual explosion. The kart that fired a flyable will
|
||||
// only be affected if it's a direct hit. This allows karts to use
|
||||
// rockets on short distance.
|
||||
if(m_owner!=kart || m_owner==kart_hit)
|
||||
{
|
||||
// Set a flag it if was a direct hit.
|
||||
kart->handleExplosion(m_curr_pos.xyz, kart==kart_hit);
|
||||
}
|
||||
}
|
||||
callback_manager->handleExplosion(pos, moving_physics);
|
||||
} // explode
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user