From: Holger Schemel Date: Mon, 25 Aug 2003 07:54:28 +0000 (+0200) Subject: rnd-20030825-1-src X-Git-Tag: 3.0.3^2~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=44297fe468c13bcf4f8facc718a325d60531afc5;p=rocksndiamonds.git rnd-20030825-1-src --- diff --git a/src/conftime.h b/src/conftime.h index 6f353088..e72f2c2b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-08-23 16:57]" +#define COMPILE_DATE_STRING "[2003-08-24 19:50]" diff --git a/src/game.c b/src/game.c index 01645260..7b3017e9 100644 --- a/src/game.c +++ b/src/game.c @@ -5348,12 +5348,21 @@ static void ChangeElementNow(int x, int y, int element) { struct ElementChangeInfo *change = &element_info[element].change; +#if 0 + if (element >= EL_CUSTOM_START + 17 && element <= EL_CUSTOM_START + 39) + printf("::: changing... [%d]\n", FrameCounter); +#endif + +#if 0 /* prevent CheckTriggeredElementChange() from looping */ Changing[x][y] = TRUE; +#endif CheckTriggeredElementChange(x, y, Feld[x][y], CE_OTHER_IS_CHANGING); +#if 0 Changing[x][y] = FALSE; +#endif if (change->explode) { @@ -5544,6 +5553,10 @@ static boolean CheckTriggeredElementChange(int lx, int ly, int trigger_element, if (!(trigger_events[trigger_element] & CH_EVENT_BIT(trigger_event))) return FALSE; + /* prevent this function from running into a loop */ + if (trigger_event == CE_OTHER_IS_CHANGING) + Changing[lx][ly] = TRUE; + for (i=0; ilast_move_dir = player->MovDir; player->is_moving = TRUE; +#if 1 + player->snapped = FALSE; +#endif } else { @@ -7636,8 +7658,15 @@ boolean SnapField(struct PlayerInfo *player, int dx, int dy) { player->is_digging = FALSE; player->is_collecting = FALSE; +#if 1 + player->is_moving = FALSE; +#endif } +#if 0 + printf("::: trying to snap...\n"); +#endif + return FALSE; } @@ -7646,12 +7675,25 @@ boolean SnapField(struct PlayerInfo *player, int dx, int dy) player->MovDir = snap_direction; +#if 1 + player->is_digging = FALSE; + player->is_collecting = FALSE; +#if 1 + player->is_moving = FALSE; +#endif +#endif + if (DigField(player, x, y, 0, 0, DF_SNAP) == MF_NO_ACTION) return FALSE; player->snapped = TRUE; +#if 1 player->is_digging = FALSE; player->is_collecting = FALSE; +#if 1 + player->is_moving = FALSE; +#endif +#endif DrawLevelField(x, y); BackToFront(); diff --git a/src/tools.c b/src/tools.c index 45d37436..9d48e4b3 100644 --- a/src/tools.c +++ b/src/tools.c @@ -599,6 +599,10 @@ void DrawPlayer(struct PlayerInfo *player) player->is_moving ? ACTION_MOVING : player->snapped ? ACTION_SNAPPING : ACTION_DEFAULT); +#if 0 + printf("::: '%s'\n", element_action_info[action].suffix); +#endif + InitPlayerGfxAnimation(player, action, move_dir); /* ----------------------------------------------------------------------- */