diff options
Diffstat (limited to 'src/particle')
-rw-r--r-- | src/particle/particle.cpp | 12 | ||||
-rw-r--r-- | src/particle/particleemitter.cpp | 8 | ||||
-rw-r--r-- | src/particle/particleengine.cpp | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index dd5b86913..3019aeda0 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -475,12 +475,12 @@ Particle *Particle::addEffect(const std::string &restrict particleEffectFile, } // Read and set the basic properties of the particle - const float offsetX = static_cast<float>(XML::getFloatProperty( - effectChildNode, "position-x", 0)); - const float offsetY = static_cast<float>(XML::getFloatProperty( - effectChildNode, "position-y", 0)); - const float offsetZ = static_cast<float>(XML::getFloatProperty( - effectChildNode, "position-z", 0)); + const float offsetX = XML::getFloatProperty( + effectChildNode, "position-x", 0); + const float offsetY = XML::getFloatProperty( + effectChildNode, "position-y", 0); + const float offsetZ = XML::getFloatProperty( + effectChildNode, "position-z", 0); const Vector position(mPos.x + static_cast<float>(pixelX) + offsetX, mPos.y + static_cast<float>(pixelY) + offsetY, mPos.z + offsetZ); diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index 326daea7a..642acd851 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -473,15 +473,15 @@ ParticleEmitter::readParticleEmitterProp(XmlNodePtrConst propertyNode, T def) { ParticleEmitterProp<T> retval; - def = static_cast<T>(XML::getFloatProperty(propertyNode, "value", + def = static_cast<T>(XML::getDoubleProperty(propertyNode, "value", static_cast<double>(def))); - retval.set(static_cast<T>(XML::getFloatProperty(propertyNode, "min", - static_cast<double>(def))), static_cast<T>(XML::getFloatProperty( + retval.set(static_cast<T>(XML::getDoubleProperty(propertyNode, "min", + static_cast<double>(def))), static_cast<T>(XML::getDoubleProperty( propertyNode, "max", static_cast<double>(def)))); const std::string change = XML::getProperty( propertyNode, "change-func", "none"); - T amplitude = static_cast<T>(XML::getFloatProperty(propertyNode, + T amplitude = static_cast<T>(XML::getDoubleProperty(propertyNode, "change-amplitude", 0.0)); const int period = XML::getProperty(propertyNode, "change-period", 0); diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp index 51620a11e..02e21e0bc 100644 --- a/src/particle/particleengine.cpp +++ b/src/particle/particleengine.cpp @@ -197,12 +197,12 @@ Particle *ParticleEngine::addEffect(const std::string &restrict } // Read and set the basic properties of the particle - const float offsetX = static_cast<float>(XML::getFloatProperty( - effectChildNode, "position-x", 0)); - const float offsetY = static_cast<float>(XML::getFloatProperty( - effectChildNode, "position-y", 0)); - const float offsetZ = static_cast<float>(XML::getFloatProperty( - effectChildNode, "position-z", 0)); + const float offsetX = XML::getFloatProperty( + effectChildNode, "position-x", 0); + const float offsetY = XML::getFloatProperty( + effectChildNode, "position-y", 0); + const float offsetZ = XML::getFloatProperty( + effectChildNode, "position-z", 0); const Vector position(static_cast<float>(pixelX) + offsetX, static_cast<float>(pixelY) + offsetY, offsetZ); |