added "multiple_actions" option for clickable global animations
[rocksndiamonds.git] / src / anim.c
index 50cbba7b73521e650248525867e655b447f16e7e..81441829e8694ef2b0fb8f44b27cb8443fe45e9e 100644 (file)
@@ -1450,8 +1450,14 @@ static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part)
   if (anim_event_action == -1)
     return FALSE;
 
-  return (DoGadgetAction(anim_event_action) ||
-         DoScreenAction(anim_event_action));
+  boolean action_executed = (DoGadgetAction(anim_event_action) ||
+                            DoScreenAction(anim_event_action));
+
+  // check if further actions are allowed to be executed
+  if (part->control_info.style & STYLE_MULTIPLE_ACTIONS)
+    return FALSE;
+
+  return action_executed;
 }
 
 static void InitGlobalAnim_Clickable()