This commit is contained in:
Alayan-stk-2 2018-08-30 05:37:07 +02:00 committed by GitHub
parent 84359ad7da
commit ad68f5c5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,7 @@ bool Swatter::updateAndTestFinished(int ticks)
float min_dist2
= m_kart->getKartProperties()->getSwatterDistance();
if (dist2 < min_dist2)
if (dist2 < min_dist2 && !m_kart->isGhostKart())
{
// Start squashing
m_animation_phase = SWATTER_TO_TARGET;
@ -312,6 +312,8 @@ void Swatter::chooseTarget()
void Swatter::pointToTarget()
{
#ifndef SERVER_ONLY
if (m_kart->isGhostKart()) return;
if(!m_target)
{
m_scene_node->setRotation(core::vector3df());
@ -334,6 +336,8 @@ void Swatter::pointToTarget()
*/
void Swatter::squashThingsAround()
{
if (m_kart->isGhostKart()) return;
const KartProperties *kp = m_kart->getKartProperties();
AbstractKart* closest_kart = m_closest_kart;