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:
deveee 2013-10-06 08:38:49 +00:00
parent 67e907fdc3
commit 9ce3a75377
2 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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();