diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-16 20:25:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-16 20:32:23 +0300 |
commit | 7752e90c8208a5ebb192f44d85174c2937fbcef8 (patch) | |
tree | 20de692df1aeb52e1134000c129b92e9fd2a58e7 | |
parent | b6826c63e304e17e852c8d7367bea420d709a0d9 (diff) | |
download | plus-7752e90c8208a5ebb192f44d85174c2937fbcef8.tar.gz plus-7752e90c8208a5ebb192f44d85174c2937fbcef8.tar.bz2 plus-7752e90c8208a5ebb192f44d85174c2937fbcef8.tar.xz plus-7752e90c8208a5ebb192f44d85174c2937fbcef8.zip |
Remove extra checks from Particle::update.
-rw-r--r-- | src/particle/particle.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 0cc97eb53..c00593470 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -213,9 +213,6 @@ void Particle::updateSelf() restrict2 bool Particle::update() restrict2 { - if (!mMap) - return false; - const Vector oldPos = mPos; updateSelf(); @@ -233,25 +230,10 @@ bool Particle::update() restrict2 } // Update child particles - - const int cameraX = viewport->getCameraX(); - const int cameraY = viewport->getCameraY(); - const float x1 = static_cast<float>(cameraX - 3000); - const float y1 = static_cast<float>(cameraY - 2000); - const float x2 = static_cast<float>(cameraX + 3000); - const float y2 = static_cast<float>(cameraY + 2000); - for (ParticleIterator p = mChildParticles.begin(), fp2 = mChildParticles.end(); p != fp2; ) { Particle *restrict const particle = *p; - const float posX = particle->mPos.x; - const float posY = particle->mPos.y; - if (posX < x1 || posX > x2 || posY < y1 || posY > y2) - { - ++p; - continue; - } // move particle with its parent if desired if (particle->mFollow) particle->moveBy(change); |