fixed handling global animation click events (again)
authorHolger Schemel <info@artsoft.org>
Fri, 31 May 2019 14:10:24 +0000 (16:10 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 31 May 2019 14:10:24 +0000 (16:10 +0200)
Before, only global animations exactly defined for the current game
mode were correctly handled. (Example: ".MAIN")

Now, also global animations defined for several game modes are
correctly handled. (Example: ".MENU")

src/anim.c

index 1e155f9eeacec35859e67fc38087bb8a54f8cb30..14dccc69c46d25a34764b0cbdbf7e18bd2354ad3 100644 (file)
@@ -1764,6 +1764,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
   boolean any_part_clicked = FALSE;
   boolean any_event_action = FALSE;
   int mode_nr;
   boolean any_part_clicked = FALSE;
   boolean any_event_action = FALSE;
   int mode_nr;
+  int i;
 
   // check game modes in reverse draw order (to stop when clicked)
   for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--)
 
   // check game modes in reverse draw order (to stop when clicked)
   for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--)
@@ -1863,7 +1864,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
   {
     handle_click = TRUE;
 
   {
     handle_click = TRUE;
 
-    HandleGlobalAnim(ANIM_CONTINUE, game_status);
+    for (i = 0; i < NUM_GAME_MODES; i++)
+      HandleGlobalAnim(ANIM_CONTINUE, i);
 
     handle_click = FALSE;
 
 
     handle_click = FALSE;