From: Holger Schemel Date: Mon, 29 Sep 2008 22:16:39 +0000 (+0200) Subject: rnd-20080930-1-src X-Git-Tag: 3.2.6.0^2~4 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5892805548bddfab434b9f1a0d376e4bf2cb10a4;p=rocksndiamonds.git rnd-20080930-1-src * fixed bug with player relocation while the player switches an element * fixed bug with EM/DC style exit and EM/DC style steel exit which was not walkable (and did not let the player enter) when in process of opening, but not fully open yet (which can cause the player not being able to enter the exit in EM/DC style levels in time) --- diff --git a/ChangeLog b/ChangeLog index 8349425e..56802695 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-29 + * fixed bug with player relocation while the player switches an element + +2008-09-24 + * fixed bug with EM/DC style exit and EM/DC style steel exit which was + not walkable (and did not let the player enter) when in process of + opening, but not fully open yet (which can cause the player not being + able to enter the exit in EM/DC style levels in time) + 2008-08-02 * fixed some bugs regarding the new level/CE random seed reset options diff --git a/src/conftime.h b/src/conftime.h index 82f62ae4..42a8c611 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2008-08-03 10:43" +#define COMPILE_DATE_STRING "2008-09-30 00:05" diff --git a/src/game.c b/src/game.c index a32fcfa7..ce628441 100644 --- a/src/game.c +++ b/src/game.c @@ -5641,6 +5641,21 @@ void RelocatePlayer(int jx, int jy, int el_player_raw) CheckTriggeredElementChangeByPlayer(jx, jy, element, CE_PLAYER_ENTERS_X, player->index_bit, enter_side); + +#if 1 + if (player->is_switching) + { + /* ensure that relocation while still switching an element does not cause + a new element to be treated as also switched directly after relocation + (this is important for teleporter switches that teleport the player to + a place where another teleporter switch is in the same direction, which + would then incorrectly be treated as immediately switched before the + direction key that caused the switch was released) */ + + player->switch_x += jx - old_jx; + player->switch_y += jy - old_jy; + } +#endif } void Explode(int ex, int ey, int phase, int mode) @@ -13622,8 +13637,14 @@ void ScrollPlayer(struct PlayerInfo *player, int mode) if (Feld[jx][jy] == EL_EXIT_OPEN || Feld[jx][jy] == EL_EM_EXIT_OPEN || +#if 1 + Feld[jx][jy] == EL_EM_EXIT_OPENING || +#endif Feld[jx][jy] == EL_STEEL_EXIT_OPEN || Feld[jx][jy] == EL_EM_STEEL_EXIT_OPEN || +#if 1 + Feld[jx][jy] == EL_EM_STEEL_EXIT_OPENING || +#endif Feld[jx][jy] == EL_SP_EXIT_OPEN || Feld[jx][jy] == EL_SP_EXIT_OPENING) /* <-- special case */ { @@ -14760,8 +14781,14 @@ static int DigField(struct PlayerInfo *player, } else if (element == EL_EXIT_OPEN || element == EL_EM_EXIT_OPEN || +#if 1 + element == EL_EM_EXIT_OPENING || +#endif element == EL_STEEL_EXIT_OPEN || element == EL_EM_STEEL_EXIT_OPEN || +#if 1 + element == EL_EM_STEEL_EXIT_OPENING || +#endif element == EL_SP_EXIT_OPEN || element == EL_SP_EXIT_OPENING) { diff --git a/src/init.c b/src/init.c index 6b7cc72e..9dab9371 100644 --- a/src/init.c +++ b/src/init.c @@ -3153,10 +3153,16 @@ void InitElementPropertiesStatic() EL_SOKOBAN_FIELD_EMPTY, EL_EXIT_OPEN, EL_EM_EXIT_OPEN, +#if 1 + EL_EM_EXIT_OPENING, +#endif EL_SP_EXIT_OPEN, EL_SP_EXIT_OPENING, EL_STEEL_EXIT_OPEN, EL_EM_STEEL_EXIT_OPEN, +#if 1 + EL_EM_STEEL_EXIT_OPENING, +#endif EL_GATE_1, EL_GATE_2, EL_GATE_3,