rnd-20040110-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 10 Jan 2004 13:56:45 +0000 (14:56 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:45:14 +0000 (10:45 +0200)
src/conftime.h
src/game.c
src/main.h

index be9034fb2f7570d3c42ee79c60b1bd9c42cf36cb..2fa059f4098200146d6a9a858ab38f6d9bedb9a1 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2004-01-03 13:42]"
+#define COMPILE_DATE_STRING "[2004-01-10 14:06]"
index 8629abd6dc8f1108060cf26b6b5e851398f426f5..20c68e41f7edfbfec10ecab5b223aa8f8e9fb799 100644 (file)
@@ -1133,6 +1133,8 @@ void InitGame()
     player->move_delay       = game.initial_move_delay;
     player->move_delay_value = game.initial_move_delay_value;
 
+    player->move_delay_reset_counter = 0;
+
     player->push_delay = 0;
     player->push_delay_value = game.initial_push_delay_value;
 
@@ -7719,6 +7721,21 @@ void ScrollPlayer(struct PlayerInfo *player, int mode)
 
   if (player->MovPos == 0)     /* player reached destination field */
   {
+#if 1
+    if (player->move_delay_reset_counter > 0)
+    {
+      player->move_delay_reset_counter--;
+
+      if (player->move_delay_reset_counter == 0)
+      {
+       /* continue with normal speed after quickly moving through gate */
+       HALVE_PLAYER_SPEED(player);
+
+       /* be able to make the next move without delay */
+       player->move_delay = 0;
+      }
+    }
+#else
     if (IS_PASSABLE(Feld[last_jx][last_jy]))
     {
       /* continue with normal speed after quickly moving through gate */
@@ -7727,6 +7744,7 @@ void ScrollPlayer(struct PlayerInfo *player, int mode)
       /* be able to make the next move without delay */
       player->move_delay = 0;
     }
+#endif
 
     player->last_jx = jx;
     player->last_jy = jy;
@@ -8508,8 +8526,19 @@ int DigField(struct PlayerInfo *player,
 
       /* automatically move to the next field with double speed */
       player->programmed_action = move_direction;
+#if 0
+      if (player->move_delay_reset_counter == 0)
+      {
+       player->move_delay_reset_counter = 2;   /* two double speed steps */
+
+       DOUBLE_PLAYER_SPEED(player);
+      }
+#else
       DOUBLE_PLAYER_SPEED(player);
 
+      player->move_delay_reset_counter = 2;
+#endif
+
       PlayLevelSound(x, y, SND_CLASS_SP_PORT_PASSING);
       break;
 
@@ -8614,8 +8643,19 @@ int DigField(struct PlayerInfo *player,
 
        /* automatically move to the next field with double speed */
        player->programmed_action = move_direction;
+#if 1
+       if (player->move_delay_reset_counter == 0)
+       {
+         player->move_delay_reset_counter = 2; /* two double speed steps */
+
+         DOUBLE_PLAYER_SPEED(player);
+       }
+#else
        DOUBLE_PLAYER_SPEED(player);
 
+       player->move_delay_reset_counter = 2;
+#endif
+
        PlayLevelSoundAction(x, y, ACTION_PASSING);
 
        break;
index 7edb064dcb758e4597099df743af5fbbc6b87abd..786c8e682d5c2575eddbdad862c2c271401e6b8d 100644 (file)
@@ -1259,6 +1259,8 @@ struct PlayerInfo
   unsigned long move_delay;
   int move_delay_value;
 
+  int move_delay_reset_counter;
+
   unsigned long push_delay;
   unsigned long push_delay_value;