Don't explode shielded kart which is near other exploded kart.
- move it to better place git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14214 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
67e907fdc3
commit
9ce3a75377
@ -494,11 +494,6 @@ void Flyable::explode(AbstractKart *kart_hit, PhysicalObject *object,
|
||||
// rockets on short distance.
|
||||
if( (m_owner!=kart || m_owner==kart_hit) && !kart->getKartAnimation())
|
||||
{
|
||||
if(kart->isShielded())
|
||||
{
|
||||
kart->decreaseShieldTime();
|
||||
continue;
|
||||
}
|
||||
// The explosion animation will register itself with the kart
|
||||
// and will free it later.
|
||||
ExplosionAnimation::create(kart, getXYZ(), kart==kart_hit);
|
||||
|
@ -38,6 +38,11 @@ ExplosionAnimation *ExplosionAnimation::create(AbstractKart *kart,
|
||||
bool direct_hit)
|
||||
{
|
||||
if(kart->isInvulnerable()) return NULL;
|
||||
else if(kart->isShielded())
|
||||
{
|
||||
kart->decreaseShieldTime();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
float r = kart->getKartProperties()->getExplosionRadius();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user