fixed state of inactive parts of global animations
[rocksndiamonds.git] / src / anim.c
index fa124cb6ab692e957125a060b0d8ffe0a013ef96..054c6a00764f533e0a78d8208d0e047ab6304220 100644 (file)
@@ -1353,6 +1353,11 @@ void HandleGlobalAnim_Main(struct GlobalAnimMainControlInfo *anim, int action)
 
   part = &anim->part[anim->active_part_nr];
 
+  // first set all animation parts to "inactive", ...
+  for (i = 0; i < num_parts; i++)
+    anim->part[i].state = ANIM_STATE_INACTIVE;
+
+  // ... then set current animation parts to "running"
   part->state = ANIM_STATE_RUNNING;
 
   anim->state = HandleGlobalAnim_Part(part, anim->state);