diff --git a/src/items/swatter.cpp b/src/items/swatter.cpp index 5d11193bc..ce46aaffe 100644 --- a/src/items/swatter.cpp +++ b/src/items/swatter.cpp @@ -267,8 +267,12 @@ void Swatter::squashThingsAround() { Kart *kart = world->getKart(i); // TODO: isSwatterReady() - if(kart->isEliminated() || kart==m_kart || kart->isSquashed()) + if(kart->isEliminated() || kart==m_kart) continue; + // don't swat an already hurt kart + if (kart->isInvulnerable() || kart->isSquashed()) + continue; + float dist2 = (kart->getXYZ()-swatter_pos).length2(); if(dist2 >= min_dist2) continue; // too far away, ignore this kart diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 6d92b5b9c..08f3ba3d1 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -1031,6 +1031,8 @@ void Kart::showZipperFire() */ void Kart::setSquash(float time, float slowdown) { + if (isInvulnerable()) return; + if(m_attachment->getType()==Attachment::ATTACH_BOMB) { this->handleExplosion(getXYZ(), /*direct hit*/true);