summaryrefslogtreecommitdiff
path: root/src/particle/particle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-17 15:15:49 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-17 15:15:49 +0300
commit879366f5dcc9362bd5e589bd70a013ea87d64430 (patch)
tree73af50efbdf5113a5874d1ad530bca29f9f2feba /src/particle/particle.cpp
parent460d7531d77019dc4ad799948e02651c9625ee2d (diff)
downloadmanaverse-879366f5dcc9362bd5e589bd70a013ea87d64430.tar.gz
manaverse-879366f5dcc9362bd5e589bd70a013ea87d64430.tar.bz2
manaverse-879366f5dcc9362bd5e589bd70a013ea87d64430.tar.xz
manaverse-879366f5dcc9362bd5e589bd70a013ea87d64430.zip
Remove extra checks from particle.
Diffstat (limited to 'src/particle/particle.cpp')
-rw-r--r--src/particle/particle.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp
index 94d5acd17..425be6c91 100644
--- a/src/particle/particle.cpp
+++ b/src/particle/particle.cpp
@@ -311,10 +311,8 @@ bool Particle::update() restrict2
for (ParticleIterator p = mChildMoveParticles.begin(),
fp2 = mChildMoveParticles.end(); p != fp2; )
{
- Particle *restrict const particle = *p;
// move particle with its parent if desired
- if (particle->mFollow)
- particle->moveBy(change);
+ (*p)->moveBy(change);
}
// Update child particles
@@ -349,9 +347,7 @@ void Particle::moveBy(const Vector &restrict change) restrict2
mPos += change;
FOR_EACH (ParticleConstIterator, p, mChildMoveParticles)
{
- Particle *restrict const particle = *p;
- if (particle->mFollow)
- particle->moveBy(change);
+ (*p)->moveBy(change);
}
}