From: Holger Schemel Date: Sun, 18 Sep 2005 10:04:13 +0000 (+0200) Subject: rnd-20050918-1-src X-Git-Tag: 3.1.2^2~53 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=b41c3d45c40a493ede30161a1d49e1f85794ba37 rnd-20050918-1-src * fixed bug preventing "walkable from no direction" from being ignored (due to compatibility code overwriting this setting after loading) --- diff --git a/ChangeLog b/ChangeLog index b3ae71e4..61685439 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-08-20 + * fixed bug preventing "walkable from no direction" from being ignored + (due to compatibility code overwriting this setting after loading) + 2005-08-15 * fixed bug on Mac OS X (use of reserved name "Random") in EM engine diff --git a/src/Makefile b/src/Makefile index 973fdead..4cd0223f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -125,7 +125,7 @@ CONFIG_GAME_DIR = $(CONFIG_RO_GAME_DIR) $(CONFIG_RW_GAME_DIR) CONFIG = $(CONFIG_GAME_DIR) $(CONFIG_SCORE_ENTRIES) $(JOYSTICK) -# DEBUG = -DDEBUG -g +DEBUG = -DDEBUG -g # PROFILING = $(PROFILING_FLAGS) # OPTIONS = $(DEBUG) -Wall # only for debugging purposes diff --git a/src/conftime.h b/src/conftime.h index d3021871..f9a04fd0 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2005-08-16 00:08]" +#define COMPILE_DATE_STRING "[2005-08-20 17:50]" diff --git a/src/files.c b/src/files.c index 93ab6bc8..e1cd2ed4 100644 --- a/src/files.c +++ b/src/files.c @@ -2760,20 +2760,23 @@ static void LoadLevel_InitElements(struct LevelInfo *level, char *filename) } /* correct custom element values (for old levels without these options) */ - for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++) + if (level->game_version < VERSION_IDENT(3,1,1,0)) { - int element = EL_CUSTOM_START + i; - struct ElementInfo *ei = &element_info[element]; + for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++) + { + int element = EL_CUSTOM_START + i; + struct ElementInfo *ei = &element_info[element]; - if (ei->access_direction == MV_NO_MOVING) - ei->access_direction = MV_ALL_DIRECTIONS; + if (ei->access_direction == MV_NO_MOVING) + ei->access_direction = MV_ALL_DIRECTIONS; - for (j = 0; j < ei->num_change_pages; j++) - { - struct ElementChangeInfo *change = &ei->change_page[j]; + for (j = 0; j < ei->num_change_pages; j++) + { + struct ElementChangeInfo *change = &ei->change_page[j]; - if (change->trigger_side == CH_SIDE_NONE) - change->trigger_side = CH_SIDE_ANY; + if (change->trigger_side == CH_SIDE_NONE) + change->trigger_side = CH_SIDE_ANY; + } } } diff --git a/src/game.c b/src/game.c index b0d7ec6b..56768b1b 100644 --- a/src/game.c +++ b/src/game.c @@ -58,6 +58,8 @@ #define USE_CHANGE_TO_TRIGGERED (TRUE * USE_NEW_STUFF * 1) +#define USE_BACK_WALKABLE_BUGFIX (TRUE * USE_NEW_STUFF * 1) + /* for DigField() */ #define DF_NO_PUSH 0 @@ -11460,6 +11462,13 @@ int DigField(struct PlayerInfo *player, if (IS_TUBE(Back[jx][jy]) && game.engine_version >= VERSION_IDENT(2,2,0,0)) old_element = Back[jx][jy]; +#if USE_BACK_WALKABLE_BUGFIX + + /* in case of element dropped at player position, check background */ + else if (Back[jx][jy] != EL_EMPTY && + game.engine_version >= VERSION_IDENT(2,2,0,0)) + old_element = Back[jx][jy]; +#endif #endif diff --git a/src/main.h b/src/main.h index 2a2714a8..f1e41134 100644 --- a/src/main.h +++ b/src/main.h @@ -1388,19 +1388,19 @@ /* program information and versioning definitions */ -#define RELEASE_311 TRUE +#define RELEASE_311 FALSE #if RELEASE_311 #define PROGRAM_VERSION_MAJOR 3 #define PROGRAM_VERSION_MINOR 1 -#define PROGRAM_VERSION_PATCH 1 +#define PROGRAM_VERSION_PATCH 2 #define PROGRAM_VERSION_BUILD 0 #else /* !!! make sure that packaging script can find unique version number !!! */ -#define X_PROGRAM_VERSION_MAJOR 3 -#define X_PROGRAM_VERSION_MINOR 2 -#define X_PROGRAM_VERSION_PATCH 0 -#define X_PROGRAM_VERSION_BUILD 3 +#define PROGRAM_VERSION_MAJOR 3 +#define PROGRAM_VERSION_MINOR 2 +#define PROGRAM_VERSION_PATCH 0 +#define PROGRAM_VERSION_BUILD 3 #endif #define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"