setaylor 10 years ago
parent
commit
5f17270eeb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gameplay/src/ParticleEmitter.cpp

+ 1 - 1
gameplay/src/ParticleEmitter.cpp

@@ -118,7 +118,7 @@ ParticleEmitter* ParticleEmitter::create(Properties* properties)
     bool spriteAnimated = sprite->getBool("animated");
     bool spriteLooped = sprite->getBool("looped");
     int spriteFrameCount = sprite->getInt("frameCount");
-    int spriteFrameRandomOffset = sprite->getInt("frameRandomOffset");
+    int spriteFrameRandomOffset = min(sprite->getInt("frameRandomOffset"), spriteFrameCount);
     float spriteFrameDuration = sprite->getFloat("frameDuration");
 
     // Emitter properties.