From 85e7f2a79477712bf3082cb82e6a73c51361abb0 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Wed, 10 Feb 2010 23:46:49 -0500 Subject: Adds missile-particle attribute to items and monster attacks To use simply add something like: missile-particle="graphics/particles/arrow.particle.xml" to the item's or monster's xml entry This will only work on equipped weapons, and on specified monster attacks. This patch also fixes a memory leak with target particles --- src/particle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/particle.cpp') diff --git a/src/particle.cpp b/src/particle.cpp index 3f75943e..69a68efe 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -254,6 +254,13 @@ void Particle::moveTo(float x, float y) moveTo(Vector(x, y, mPos.z)); } +Particle *Particle::createChild() +{ + Particle *newParticle = new Particle(mMap); + mChildParticles.push_back(newParticle); + return newParticle; +} + Particle *Particle::addEffect(const std::string &particleEffectFile, int pixelX, int pixelY, int rotation) { -- cgit v1.2.3-60-g2f50