Clean star effects if explosion animation failed to create
This commit is contained in:
parent
e6b8163579
commit
d8d0e870b1
@ -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
|
||||
|
||||
|
||||
|
@ -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<ExplosionAnimation*>(this) && m_kart)
|
||||
m_kart->getStarsEffect()->reset();
|
||||
}
|
||||
} // checkNetworkAnimationCreationSucceed
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user