diff --git a/src/graphics/explosion.cpp b/src/graphics/explosion.cpp index 79fa8ebf7..028a37a20 100644 --- a/src/graphics/explosion.cpp +++ b/src/graphics/explosion.cpp @@ -34,14 +34,14 @@ const float burst_time = 0.1f; /** Creates an explosion effect. */ -Explosion::Explosion(const Vec3& coord, const char* explosion_sound) +Explosion::Explosion(const Vec3& coord, const char* explosion_sound, const char * particle_file) : HitSFX(coord, explosion_sound) { // short emision time, explosion, not constant flame m_remaining_time = burst_time; ParticleKindManager* pkm = ParticleKindManager::get(); - ParticleKind* particles = pkm->getParticles("explosion.xml"); + ParticleKind* particles = pkm->getParticles(particle_file); m_emitter = new ParticleEmitter(particles, coord, NULL); } // Explosion diff --git a/src/graphics/explosion.hpp b/src/graphics/explosion.hpp index 1d2a843fd..a5f848143 100644 --- a/src/graphics/explosion.hpp +++ b/src/graphics/explosion.hpp @@ -44,7 +44,7 @@ private: ParticleEmitter* m_emitter; public: - Explosion(const Vec3& coord, const char* explosion_sound); + Explosion(const Vec3& coord, const char* explosion_sound, const char * particle_file ); ~Explosion(); bool updateAndDelete(float delta_t); bool hasEnded () { return m_remaining_time <= -explosion_time; } diff --git a/src/items/attachment.cpp b/src/items/attachment.cpp index e974de71f..1bbbdf2cc 100644 --- a/src/items/attachment.cpp +++ b/src/items/attachment.cpp @@ -222,7 +222,7 @@ void Attachment::hitBanana(Item *item, int new_attachment) case ATTACH_BOMB: { add_a_new_item = false; - HitEffect *he = new Explosion(m_kart->getXYZ(), "explosion"); + HitEffect *he = new Explosion(m_kart->getXYZ(), "explosion", "explosion_bomb.xml"); if(m_kart->getController()->isPlayerController()) he->setPlayerKartHit(); projectile_manager->addHitEffect(he); @@ -397,7 +397,7 @@ void Attachment::update(float dt) } if(m_time_left<=0.0) { - HitEffect *he = new Explosion(m_kart->getXYZ(), "explosion"); + HitEffect *he = new Explosion(m_kart->getXYZ(), "explosion", "explosion_bomb.xml"); if(m_kart->getController()->isPlayerController()) he->setPlayerKartHit(); projectile_manager->addHitEffect(he); diff --git a/src/items/flyable.cpp b/src/items/flyable.cpp index c46496c16..d0116415d 100644 --- a/src/items/flyable.cpp +++ b/src/items/flyable.cpp @@ -512,7 +512,7 @@ void Flyable::explode(AbstractKart *kart_hit, PhysicalObject *object, */ HitEffect* Flyable::getHitEffect() const { - return new Explosion(getXYZ(), "explosion"); + return new Explosion(getXYZ(), "explosion", "explosion_cake.xml"); } // getHitEffect /* EOF */ diff --git a/src/items/swatter.cpp b/src/items/swatter.cpp index acb7bd318..0a147dadb 100644 --- a/src/items/swatter.cpp +++ b/src/items/swatter.cpp @@ -308,7 +308,7 @@ void Swatter::squashThingsAround() if (kart->getAttachment()->getType()==Attachment::ATTACH_BOMB) { // make bomb explode kart->getAttachment()->update(10000); - HitEffect *he = new Explosion(m_kart->getXYZ(), "explosion"); + HitEffect *he = new Explosion(m_kart->getXYZ(), "explosion", "explosion.xml"); if(m_kart->getController()->isPlayerController()) he->setPlayerKartHit(); projectile_manager->addHitEffect(he);