diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2008-12-14 03:43:37 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-12-14 09:13:39 -0700 |
commit | 712744c5c985a906891a41679adbe6468e82649b (patch) | |
tree | c6f49cd89cf84e00212ba655629465a6c8cf106b /src/particlecontainer.cpp | |
parent | ae7cd9ca453aee25ccf1f4eb277ab77144910da5 (diff) | |
download | mana-712744c5c985a906891a41679adbe6468e82649b.tar.gz mana-712744c5c985a906891a41679adbe6468e82649b.tar.bz2 mana-712744c5c985a906891a41679adbe6468e82649b.tar.xz mana-712744c5c985a906891a41679adbe6468e82649b.zip |
Fixed follow-parent of nested and being-following particle emitters
Diffstat (limited to 'src/particlecontainer.cpp')
-rw-r--r-- | src/particlecontainer.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/particlecontainer.cpp b/src/particlecontainer.cpp index 12ef5733..fbfb1505 100644 --- a/src/particlecontainer.cpp +++ b/src/particlecontainer.cpp @@ -44,12 +44,10 @@ ParticleContainer::clear() mNext->clear(); } - -void -ParticleContainer::setPositions(float x, float y) +void ParticleContainer::moveTo(float x, float y) { if (mNext) - mNext->setPositions(x, y); + mNext->moveTo(x, y); } // -- particle list ---------------------------------------- @@ -91,15 +89,14 @@ ParticleList::clearLocally() mElements.clear(); } -void -ParticleList::setPositions(float x, float y) +void ParticleList::moveTo(float x, float y) { - ParticleContainer::setPositions(x, y); + ParticleContainer::moveTo(x, y); for (std::list<Particle *>::iterator it = mElements.begin(); it != mElements.end();) { - (*it)->setPosition(x, y); + (*it)->moveTo(x, y); if ((*it)->isExtinct()) { (*it)->kill(); @@ -156,16 +153,15 @@ ParticleVector::clearLocally() delLocally(i); } -void -ParticleVector::setPositions(float x, float y) +void ParticleVector::moveTo(float x, float y) { - ParticleContainer::setPositions(x, y); + ParticleContainer::moveTo(x, y); for (std::vector<Particle *>::iterator it = mIndexedElements.begin(); it != mIndexedElements.end(); it++) if (*it) { - (*it)->setPosition(x, y); + (*it)->moveTo(x, y); if ((*it)->isExtinct()) { |