From: Holger Schemel Date: Wed, 7 Jun 2006 07:38:44 +0000 (+0200) Subject: rnd-20060607-1-src X-Git-Tag: 3.2.0^2~6 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=2447100f7c3eacf4361973fa90814d9bd0e2b055;p=rocksndiamonds.git rnd-20060607-1-src * fixed bug with displaying running player when player stopped at border --- diff --git a/ChangeLog b/ChangeLog index c07604be..7ce1772e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2006-06-06 * fixed bug with displaying any player as "yellow" when moving into acid + * fixed bug with displaying running player when player stopped at border 2006-06-03 * fixed bug with player exploding when moving into acid diff --git a/src/conftime.h b/src/conftime.h index 4df6b8bb..ddaadea5 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-06-06 00:32]" +#define COMPILE_DATE_STRING "[2006-06-06 23:46]" diff --git a/src/game.c b/src/game.c index ac37d91e..09eea8f3 100644 --- a/src/game.c +++ b/src/game.c @@ -44,6 +44,7 @@ #define USE_GFX_RESET_GFX_ANIMATION (USE_NEW_STUFF * 1) #define USE_BOTH_SWITCHGATE_SWITCHES (USE_NEW_STUFF * 1) #define USE_PLAYER_GRAVITY (USE_NEW_STUFF * 1) +#define USE_FIXED_BORDER_RUNNING_GFX (USE_NEW_STUFF * 1) #define USE_QUICKSAND_IMPACT_BUGFIX (USE_NEW_STUFF * 0) @@ -1993,6 +1994,8 @@ void InitGame() player->last_move_dir = MV_NONE; + player->is_active = FALSE; + player->is_waiting = FALSE; player->is_moving = FALSE; player->is_auto_moving = FALSE; @@ -10587,6 +10590,8 @@ boolean MovePlayer(struct PlayerInfo *player, int dx, int dy) player->move_delay_value = original_move_delay_value; } + player->is_active = FALSE; + if (player->last_move_dir & MV_HORIZONTAL) { if (!(moved |= MovePlayerOneStep(player, 0, dy, dx, dy))) @@ -10598,6 +10603,17 @@ boolean MovePlayer(struct PlayerInfo *player, int dx, int dy) moved |= MovePlayerOneStep(player, 0, dy, dx, dy); } +#if USE_FIXED_BORDER_RUNNING_GFX + if (!moved && !player->is_active) + { + player->is_moving = FALSE; + player->is_digging = FALSE; + player->is_collecting = FALSE; + player->is_snapping = FALSE; + player->is_pushing = FALSE; + } +#endif + jx = player->jx; jy = player->jy; @@ -12182,6 +12198,7 @@ int DigField(struct PlayerInfo *player, } player->is_pushing = TRUE; + player->is_active = TRUE; if (!(IN_LEV_FIELD(nextx, nexty) && (IS_FREE(nextx, nexty) || @@ -12434,7 +12451,10 @@ int DigField(struct PlayerInfo *player, if (is_player) /* function can also be called by EL_PENGUIN */ { if (Feld[x][y] != element) /* really digged/collected something */ + { player->is_collecting = !player->is_digging; + player->is_active = TRUE; + } } return MP_MOVING; @@ -12503,6 +12523,7 @@ boolean SnapField(struct PlayerInfo *player, int dx, int dy) return FALSE; player->is_snapping = TRUE; + player->is_active = TRUE; if (player->MovPos == 0) { diff --git a/src/game.h b/src/game.h index 10ae3eaf..71ad7a0a 100644 --- a/src/game.h +++ b/src/game.h @@ -115,6 +115,8 @@ struct PlayerInfo int last_move_dir; + boolean is_active; + boolean is_waiting; boolean is_moving; boolean is_auto_moving; diff --git a/src/main.h b/src/main.h index 53fa767f..ddd12186 100644 --- a/src/main.h +++ b/src/main.h @@ -784,6 +784,11 @@ IS_EDITOR_CASCADE_ACTIVE(e) ? (e) - 1 : (e)) #define EL_NAME(e) ((e) >= 0 ? element_info[e].token_name : "(?)") +#define MV_TEXT(d) ((d) == MV_NONE ? "MV_NONE" : \ + (d) == MV_LEFT ? "MV_LEFT" : \ + (d) == MV_RIGHT ? "MV_RIGHT" : \ + (d) == MV_UP ? "MV_UP" : \ + (d) == MV_DOWN ? "MV_DOWN" : "(various)") /* fundamental game speed values */ #define MICROLEVEL_SCROLL_DELAY 50 /* delay for scrolling micro level */