summaryrefslogtreecommitdiff
path: root/src/particleemitter.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-18 22:13:37 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-18 22:13:37 +0200
commitf4792bc06f21335fc2d1171d937ea7645ca0c253 (patch)
treec7b11cf81f254f5b9ed2f5dbfe127649abc7545a /src/particleemitter.cpp
parentf98d003e354a1792117b7cbc771d1dd91475a156 (diff)
downloadmv-f4792bc06f21335fc2d1171d937ea7645ca0c253.tar.gz
mv-f4792bc06f21335fc2d1171d937ea7645ca0c253.tar.bz2
mv-f4792bc06f21335fc2d1171d937ea7645ca0c253.tar.xz
mv-f4792bc06f21335fc2d1171d937ea7645ca0c253.zip
Fix most conversions except manaserv net code and some other code.
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r--src/particleemitter.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index f1bb81d59..cd42fd865 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -357,15 +357,30 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target,
propertyNode->xmlChildrenNode->content);
mDeathEffectConditions = 0x00;
if (XML::getBoolProperty(propertyNode, "on-floor", true))
- mDeathEffectConditions += Particle::DEAD_FLOOR;
+ {
+ mDeathEffectConditions += static_cast<char>(
+ Particle::DEAD_FLOOR);
+ }
if (XML::getBoolProperty(propertyNode, "on-sky", true))
- mDeathEffectConditions += Particle::DEAD_SKY;
+ {
+ mDeathEffectConditions += static_cast<char>(
+ Particle::DEAD_SKY);
+ }
if (XML::getBoolProperty(propertyNode, "on-other", false))
- mDeathEffectConditions += Particle::DEAD_OTHER;
+ {
+ mDeathEffectConditions += static_cast<char>(
+ Particle::DEAD_OTHER);
+ }
if (XML::getBoolProperty(propertyNode, "on-impact", true))
- mDeathEffectConditions += Particle::DEAD_IMPACT;
+ {
+ mDeathEffectConditions += static_cast<char>(
+ Particle::DEAD_IMPACT);
+ }
if (XML::getBoolProperty(propertyNode, "on-timeout", true))
- mDeathEffectConditions += Particle::DEAD_TIMEOUT;
+ {
+ mDeathEffectConditions += static_cast<char>(
+ Particle::DEAD_TIMEOUT);
+ }
}
}
}
@@ -570,6 +585,8 @@ void ParticleEmitter::adjustSize(int w, int h)
// adjust the output so that the particle density stays the same
float outputFactor = static_cast<float>(newArea)
/ static_cast<float>(oldArea);
- mOutput.minVal *= static_cast<float>(outputFactor);
- mOutput.maxVal *= static_cast<float>(outputFactor);
+ mOutput.minVal = static_cast<int>(static_cast<float>(
+ mOutput.minVal) * outputFactor);
+ mOutput.maxVal = static_cast<int>(static_cast<float>(
+ mOutput.maxVal) * outputFactor);
}