summaryrefslogtreecommitdiff
path: root/src/particleemitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r--src/particleemitter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index 27eb89291..4ba8c9c6b 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -221,10 +221,11 @@ ParticleEmitter::ParticleEmitter(XmlNodePtr emitterNode, Particle *target,
// Get animation frames
for_each_xml_child_node(frameNode, propertyNode)
{
- int delay = XML::getProperty(frameNode, "delay", 0);
+ int delay = XML::getIntProperty(
+ frameNode, "delay", 0, 0, 100000);
int offsetX = XML::getProperty(frameNode, "offsetX", 0);
int offsetY = XML::getProperty(frameNode, "offsetY", 0);
- int rand = XML::getProperty(frameNode, "rand", 100);
+ int rand = XML::getIntProperty(frameNode, "rand", 100, 0, 100);
offsetY -= imageset->getHeight() - 32;
offsetX -= imageset->getWidth() / 2 - 16;
@@ -300,10 +301,11 @@ ParticleEmitter::ParticleEmitter(XmlNodePtr emitterNode, Particle *target,
// Get animation frames
for_each_xml_child_node(frameNode, propertyNode)
{
- int delay = XML::getProperty(frameNode, "delay", 0);
+ int delay = XML::getIntProperty(
+ frameNode, "delay", 0, 0, 100000);
int offsetX = XML::getProperty(frameNode, "offsetX", 0);
int offsetY = XML::getProperty(frameNode, "offsetY", 0);
- int rand = XML::getProperty(frameNode, "rand", 100);
+ int rand = XML::getIntProperty(frameNode, "rand", 100, 0, 100);
offsetY -= imageset->getHeight() - 32;
offsetX -= imageset->getWidth() / 2 - 16;