From: Holger Schemel Date: Sat, 10 Jan 2004 13:56:45 +0000 (+0100) Subject: rnd-20040110-1-src X-Git-Tag: 3.1.0^2~104 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=13438f0d6ec6294e852d15e9fe7170ca12a7a937;p=rocksndiamonds.git rnd-20040110-1-src --- diff --git a/src/conftime.h b/src/conftime.h index be9034fb..2fa059f4 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-01-03 13:42]" +#define COMPILE_DATE_STRING "[2004-01-10 14:06]" diff --git a/src/game.c b/src/game.c index 8629abd6..20c68e41 100644 --- a/src/game.c +++ b/src/game.c @@ -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; diff --git a/src/main.h b/src/main.h index 7edb064d..786c8e68 100644 --- a/src/main.h +++ b/src/main.h @@ -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;