From 351821c1f18f9285be58df0a05339936311f6490 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 12 Apr 2013 18:39:00 +0300 Subject: first part of style fixed after cpplint checks. --- src/particle.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/particle.cpp') diff --git a/src/particle.cpp b/src/particle.cpp index a0a01a09a..50b41018e 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -85,7 +85,6 @@ Particle::~Particle() { // Delete child emitters and child particles clear(); - //update particle count Particle::particleCount--; } @@ -118,7 +117,7 @@ bool Particle::update() if (mAlive == ALIVE) { - //calculate particle movement + // calculate particle movement if (mMomentum != 1.0f) mVelocity *= mMomentum; @@ -238,11 +237,11 @@ bool Particle::update() p2 = mChildParticles.end(); p != p2; ) { Particle *const particle = *p; - //move particle with its parent if desired + // move particle with its parent if desired if (particle->doesFollow()) particle->moveBy(change); - //update particle + // update particle if (particle->update()) { ++p; @@ -347,7 +346,7 @@ Particle *Particle::addEffect(const std::string &particleEffectFile, effectChildNode, "position-y", 0)); const float offsetZ = static_cast(XML::getFloatProperty( effectChildNode, "position-z", 0)); - const Vector position (mPos.x + static_cast(pixelX) + offsetX, + const Vector position(mPos.x + static_cast(pixelX) + offsetX, mPos.y + static_cast(pixelY) + offsetY, mPos.z + offsetZ); newParticle->moveTo(position); @@ -420,9 +419,9 @@ Particle *Particle::addTextSplashEffect(const std::string &text, mMap, text, color, font, outline); newParticle->moveTo(static_cast(x), static_cast(y)); newParticle->setVelocity( - static_cast((rand() % 100) - 50) / 200.0f, // X - static_cast((rand() % 100) - 50) / 200.0f, // Y - (static_cast((rand() % 100)) / 200.0f) + 4.0f); // Z + static_cast((rand() % 100) - 50) / 200.0f, // X + static_cast((rand() % 100) - 50) / 200.0f, // Y + (static_cast((rand() % 100)) / 200.0f) + 4.0f); // Z newParticle->setGravity(0.1f); newParticle->setBounce(0.5f); -- cgit v1.2.3-60-g2f50