fixed moving tile selection cursor
[rocksndiamonds.git] / src / libgame / system.c
index dea7258d009e5cef1816ed53fd17742a5e98035b..a35f91d6827b3ffd7d6a772614519c31c350c8d4 100644 (file)
@@ -310,6 +310,7 @@ void InitTileCursorInfo()
 {
   tile_cursor.enabled = FALSE;
   tile_cursor.active = FALSE;
+  tile_cursor.moving = FALSE;
 
   tile_cursor.xpos = 0;
   tile_cursor.ypos = 0;
@@ -349,6 +350,8 @@ void SetTileCursorTargetXY(int x, int y)
   tile_cursor.ypos = y;
   tile_cursor.target_x = gfx.sx + x * gfx.game_tile_size;
   tile_cursor.target_y = gfx.sy + y * gfx.game_tile_size;
+
+  tile_cursor.moving = TRUE;
 }
 
 void SetTileCursorXY(int x, int y)
@@ -359,6 +362,8 @@ void SetTileCursorXY(int x, int y)
 
   tile_cursor.x = tile_cursor.target_x;
   tile_cursor.y = tile_cursor.target_y;
+
+  tile_cursor.moving = FALSE;
 }
 
 void SetOverlayEnabled(boolean enabled)