diff --git a/src/karts/abstract_kart.hpp b/src/karts/abstract_kart.hpp index bac44ca36..97ec546b3 100644 --- a/src/karts/abstract_kart.hpp +++ b/src/karts/abstract_kart.hpp @@ -50,6 +50,7 @@ class RenderInfo; class SFXBuffer; class Skidding; class SlipStream; +class Stars; class TerrainInfo; @@ -523,6 +524,8 @@ public: virtual float getStartupBoost() const = 0; // ------------------------------------------------------------------------ virtual float getStartupBoostFromStartTicks(int ticks) const = 0; + // ------------------------------------------------------------------------ + virtual Stars* getStarsEffect() const = 0; }; // AbstractKart diff --git a/src/karts/abstract_kart_animation.cpp b/src/karts/abstract_kart_animation.cpp index 4ac48462b..6ccbafa57 100644 --- a/src/karts/abstract_kart_animation.cpp +++ b/src/karts/abstract_kart_animation.cpp @@ -19,8 +19,10 @@ #include "karts/abstract_kart_animation.hpp" #include "graphics/slip_stream.hpp" +#include "graphics/stars.hpp" #include "items/powerup.hpp" #include "karts/abstract_kart.hpp" +#include "karts/explosion_animation.hpp" #include "karts/kart_model.hpp" #include "karts/skidding.hpp" #include "modes/world.hpp" @@ -183,6 +185,8 @@ void AbstractKartAnimation:: m_timer = -1; m_end_transform = fallback_trans; m_ignore_undo = true; + if (dynamic_cast(this) && m_kart) + m_kart->getStarsEffect()->reset(); } } // checkNetworkAnimationCreationSucceed diff --git a/src/karts/kart.hpp b/src/karts/kart.hpp index 14768e44a..569880fe2 100644 --- a/src/karts/kart.hpp +++ b/src/karts/kart.hpp @@ -555,6 +555,9 @@ public: virtual void playSound(SFXBuffer* buffer) OVERRIDE; // ------------------------------------------------------------------------ virtual bool isVisible() OVERRIDE; + // ------------------------------------------------------------------------ + virtual Stars* getStarsEffect() const OVERRIDE { return m_stars_effect; } + }; // Kart