{
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)
{
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; i<MAX_NUM_ELEMENTS; i++)
{
if (!CAN_CHANGE(i) || !HAS_CHANGE_EVENT(i, trigger_event) ||
{
ChangeDelay[x][y] = 1;
ChangeElement(x, y);
+
+ Changing[x][y] = TRUE; /* do not change just changed elements */
}
}
}
+ /* reset change prevention array */
+ for (y=0; y<lev_fieldy; y++) for (x=0; x<lev_fieldx; x++)
+ Changing[x][y] = FALSE;
+
return TRUE;
}
player->last_move_dir = player->MovDir;
player->is_moving = TRUE;
+#if 1
+ player->snapped = FALSE;
+#endif
}
else
{
{
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;
}
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();
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);
/* ----------------------------------------------------------------------- */