From: Holger Schemel Date: Tue, 24 Jun 2003 06:11:49 +0000 (+0200) Subject: rnd-20030624-1-src X-Git-Tag: 3.0.0^2~40 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=818bda3a0148d769381987629ebb8908bdad4826;p=rocksndiamonds.git rnd-20030624-1-src --- diff --git a/src/conftime.h b/src/conftime.h index dbf55932..5fa30017 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-06-20 18:24]" +#define COMPILE_DATE_STRING "[2003-06-23 23:45]" diff --git a/src/game.c b/src/game.c index 4ea608c3..d0f7751b 100644 --- a/src/game.c +++ b/src/game.c @@ -5010,7 +5010,12 @@ static void CheckPlayerElementChange(int x, int y, int element, if (!CAN_CHANGE(element) || !HAS_CHANGE_EVENT(element, trigger_event)) return; +#if 1 + ChangeDelay[x][y] = 1; + ChangeElement(x, y); +#else ChangeElementDoIt(x, y, element_info[element].change.successor); +#endif } static void PlayerActions(struct PlayerInfo *player, byte player_action) @@ -6366,6 +6371,7 @@ static boolean checkDiagonalPushing(struct PlayerInfo *player, int DigField(struct PlayerInfo *player, int x, int y, int real_dx, int real_dy, int mode) { + boolean use_spring_bug = (game.engine_version < VERSION_IDENT(2,2,0)); int jx = player->jx, jy = player->jy; int dx = x - jx, dy = y - jy; int move_direction = (dx == -1 ? MV_LEFT : @@ -6779,6 +6785,10 @@ int DigField(struct PlayerInfo *player, if (dy) return MF_NO_ACTION; + if (CAN_FALL(element) && IN_LEV_FIELD(x, y + 1) && IS_FREE(x, y + 1) && + !(element == EL_SPRING && use_spring_bug)) + return MF_NO_ACTION; + player->Pushing = TRUE; #if 0 @@ -7195,6 +7205,9 @@ int DigField(struct PlayerInfo *player, if (CAN_FALL(element) && dy) return MF_NO_ACTION; + if (CAN_FALL(element) && IN_LEV_FIELD(x, y + 1) && IS_FREE(x, y + 1)) + return MF_NO_ACTION; + if (!player->Pushing && game.engine_version >= RELEASE_IDENT(2,2,0,7)) player->push_delay_value = GET_NEW_PUSH_DELAY(element); @@ -7235,7 +7248,11 @@ int DigField(struct PlayerInfo *player, PlaySoundLevelElementAction(x, y, element, ACTION_PUSHING); CheckTriggeredElementChange(element, CE_OTHER_PUSHING); +#if 1 + CheckPlayerElementChange(x, y, element, CE_PUSHED_BY_PLAYER); +#else CheckPlayerElementChange(x + dx, y + dy, element, CE_PUSHED_BY_PLAYER); +#endif break; } diff --git a/src/tools.c b/src/tools.c index 867ee3c0..761aa4a8 100644 --- a/src/tools.c +++ b/src/tools.c @@ -707,7 +707,7 @@ void DrawPlayer(struct PlayerInfo *player) NO_CUTTING); else { -#if 0 +#if 1 int element = Feld[jx][jy]; #else int element = Feld[next_jx][next_jy];