summaryrefslogtreecommitdiff
path: root/src/particle/particlelist.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-24 18:35:07 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-24 18:35:07 +0300
commit1d1ac3f13f96f0fa69fc57ea61af6e59d4e910a9 (patch)
treeb97a0117d58e382191aaaf2d9770b9e3e0275f0f /src/particle/particlelist.cpp
parenta6c1e29279d28b18012e1a87d23ff114302bd610 (diff)
downloadmanaverse-1d1ac3f13f96f0fa69fc57ea61af6e59d4e910a9.tar.gz
manaverse-1d1ac3f13f96f0fa69fc57ea61af6e59d4e910a9.tar.bz2
manaverse-1d1ac3f13f96f0fa69fc57ea61af6e59d4e910a9.tar.xz
manaverse-1d1ac3f13f96f0fa69fc57ea61af6e59d4e910a9.zip
Allow kill infinite particles if parent particle will be removed.
Diffstat (limited to 'src/particle/particlelist.cpp')
-rw-r--r--src/particle/particlelist.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/particle/particlelist.cpp b/src/particle/particlelist.cpp
index c95bec9e6..6c2818681 100644
--- a/src/particle/particlelist.cpp
+++ b/src/particle/particlelist.cpp
@@ -36,7 +36,8 @@ ParticleList::ParticleList(ParticleContainer *const parent,
{}
ParticleList::~ParticleList()
-{}
+{
+}
void ParticleList::addLocally(Particle *const particle)
{
@@ -57,6 +58,7 @@ void ParticleList::removeLocally(const Particle *const particle)
if (p == particle)
{
p->kill();
+ p->prepareToDie();
it = mElements.erase(it);
}
else