fixed bug with tile selection cursor for MM game engine
authorHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 23:40:32 +0000 (00:40 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 23:40:32 +0000 (00:40 +0100)
src/game_mm/mm_tools.c

index 28fe9bfe5ed5b9af5c7fba99434a535547110973..0906862b33cbaa3d6f478e8f6d0d9697b1fa4c89 100644 (file)
@@ -952,18 +952,6 @@ static void DrawTileCursor_Xsn(int draw_target)
   if (!active)
     return;
 
-  if (!active_last)
-  {
-    boolean no_delay = (debug || setup.debug.xsn_mode == TRUE);
-
-    start_delay_value = (no_delay ? 0 : XSN_RND(XSN_START_DELAY * 2) * 1000);
-    started = FALSE;
-
-    DelayReached(&start_delay, 0);
-
-    reinitialize = TRUE;
-  }
-
   if (!initialized)
   {
     xsn.area_xsize = gfx.win_xsize;
@@ -1003,6 +991,17 @@ static void DrawTileCursor_Xsn(int draw_target)
     initialized = TRUE;
   }
 
+  if (!active_last)
+  {
+    start_delay_value = (debug || setup.debug.xsn_mode == TRUE ? 0 :
+                        (XSN_START_DELAY + XSN_RND(XSN_START_DELAY)) * 1000);
+    started = FALSE;
+
+    DelayReached(&start_delay, 0);
+
+    reinitialize = TRUE;
+  }
+
   if (reinitialize)
   {
     xsn.num_items  = 0;