2004-04-20
* added "replace when walkable" to relocate player to walkable element
+ * added "enter"/"leave" event for elements affected by relocation
+ * fixed "direct"/"indirect" change order also for "when change" event
2004-04-18
* fixed graphic bug when player is snapping while moving in old levels
Feld[jx][jy] = el_player;
InitPlayerField(jx, jy, el_player, TRUE);
- Feld[jx][jy] = element; /* player may be set on walkable element */
- InitField(jx, jy, FALSE);
+ if (!ELEM_IS_PLAYER(element)) /* player may be set on walkable element */
+ {
+ Feld[jx][jy] = element;
+ InitField(jx, jy, FALSE);
+ }
#if 1
if (player == local_player) /* only visually relocate local player */
{
struct ElementChangeInfo *change = &element_info[element].change_page[page];
int target_element;
+ int old_element = Feld[x][y];
/* always use default change event to prevent running into a loop */
if (ChangeEvent[x][y] == CE_BITMASK_DEFAULT)
Changed[x][y] |= ChangeEvent[x][y]; /* ignore same changes in this frame */
-#if 1
+#if 0
/* !!! indirect change before direct change !!! */
CheckTriggeredElementChangeByPage(x,y,Feld[x][y], CE_OTHER_IS_CHANGING,page);
#endif
PlayLevelSoundElementAction(x, y, element, ACTION_CHANGING);
}
+#if 1
+ /* !!! indirect change before direct change !!! */
+ CheckTriggeredElementChangeByPage(x,y,old_element,CE_OTHER_IS_CHANGING,page);
+#endif
+
return TRUE;
}
else if (player_is_moving && IS_ACCESSIBLE_UNDER(last_element))
DrawLevelFieldThruMask(last_jx, last_jy);
-#if 1
+#if 0
+ /* !!! I have forgotton what this should be good for !!! */
+ /* !!! causes player being visible when pushing from within tubes !!! */
if (!player->is_pushing)
#endif
{