From: Holger Schemel Date: Wed, 5 May 2004 20:34:18 +0000 (+0200) Subject: rnd-20040505-1-src X-Git-Tag: 3.1.0^2~8 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ab1a6440a44517279f96c044bf6afb8309839255;p=rocksndiamonds.git rnd-20040505-1-src * fixed bug that caused two activated toolbox buttons in level editor --- diff --git a/ChangeLog b/ChangeLog index 91719802..14a869f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-05-05 + * fixed bug that caused two activated toolbox buttons in level editor + 2004-05-02 * fixed bug with creating walkable custom element under player (again) * fixed bug with not copying explosion type when copying CEs in editor @@ -5,11 +8,12 @@ * fixed graphical bug when the player is pushing an accessible element * fixed bug with classic switchable elements triggering CE changes * fixed bug with entering/leaving walkable element in RelocatePlayer() - * added special behaviour of Supaplex ports with gravity enabled + * fixed crash bug when CE leaves behind the trigger player element 2004-04-30 * fixed bug with broken tubes after placing/exploding dynamite in them * fixed bug with exploding dynamite under player due to other explosion + * fixed bug with not resetting push delay under certain circumstances 2004-04-27 * added option "handicap" for "levelinfo.conf" (thanks to Niko Böhm) diff --git a/src/conftime.h b/src/conftime.h index 878eea86..ff374765 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-05-02 19:17]" +#define COMPILE_DATE_STRING "[2004-05-05 22:30]" diff --git a/src/editor.c b/src/editor.c index 17f95fde..89363f8f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -9065,7 +9065,15 @@ void HandleLevelEditorKeyInput(Key key) { RequestExitLevelEditor(setup.ask_on_escape); } - else + else if (edit_mode == ED_MODE_INFO) + { + HandleControlButtons(level_editor_gadget[GADGET_ID_INFO]); + } + else if (edit_mode == ED_MODE_PROPERTIES) + { + HandleControlButtons(level_editor_gadget[GADGET_ID_PROPERTIES]); + } + else /* should never happen */ { DrawDrawingWindow(); edit_mode = ED_MODE_DRAWING; diff --git a/src/game.c b/src/game.c index 467603a8..f0f4dbf7 100644 --- a/src/game.c +++ b/src/game.c @@ -114,8 +114,11 @@ ((e) == EL_TRIGGER_ELEMENT ? (ch)->actual_trigger_element : \ (e) == EL_TRIGGER_PLAYER ? (ch)->actual_trigger_player : (e)) +#define GET_VALID_PLAYER_ELEMENT(e) \ + ((e) >= EL_PLAYER_1 && (e) <= EL_PLAYER_4 ? (e) : EL_PLAYER_1) + #define CAN_GROW_INTO(e) \ - (e == EL_SAND || (IS_DIGGABLE(e) && level.grow_into_diggable)) + ((e) == EL_SAND || (IS_DIGGABLE(e) && level.grow_into_diggable)) #define ELEMENT_CAN_ENTER_FIELD_BASE_X(x, y, condition) \ (IN_LEV_FIELD(x, y) && (IS_FREE(x, y) || \ @@ -2818,7 +2821,11 @@ void DrawRelocatePlayer(struct PlayerInfo *player) void RelocatePlayer(int jx, int jy, int el_player_raw) { +#if 1 + int el_player = GET_VALID_PLAYER_ELEMENT(el_player_raw); +#else int el_player = (el_player_raw == EL_SP_MURPHY ? EL_PLAYER_1 :el_player_raw); +#endif struct PlayerInfo *player = &stored_player[el_player - EL_PLAYER_1]; boolean ffwd_delay = (tape.playing && tape.fast_forward); boolean no_delay = (tape.warp_forward); @@ -9077,7 +9084,9 @@ static boolean canMoveToValidFieldWithGravity(int x, int y, int move_dir) #if 1 return (IN_LEV_FIELD(newx, newy) && !IS_FREE_OR_PLAYER(newx, newy) && IS_GRAVITY_REACHABLE(Feld[newx][newy]) && +#if 0 (!IS_SP_PORT(Feld[newx][newy]) || move_dir == MV_UP) && +#endif (IS_DIGGABLE(Feld[newx][newy]) || IS_WALKABLE_FROM(Feld[newx][newy], opposite_dir) || canPassField(newx, newy, move_dir)));