From: Holger Schemel Date: Sat, 10 Dec 2005 18:00:27 +0000 (+0100) Subject: rnd-20051210-3-src X-Git-Tag: 3.1.2^2~32 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d3ffb1e08b58d32e36682e8376c26dd5585bb421;p=rocksndiamonds.git rnd-20051210-3-src * fixed bug with invalid ("undefined") CE settings in old level files --- diff --git a/ChangeLog b/ChangeLog index 4dc9d356..f460f137 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2005-12-10 * added image config suffix ".clone_from" to copy whole image settings + * fixed bug with invalid ("undefined") CE settings in old level files 2005-12-05 * fixed graphical bug with smashing elements falling faster than player diff --git a/src/conftime.h b/src/conftime.h index c6713ecc..a38f62e3 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2005-12-10 17:15]" +#define COMPILE_DATE_STRING "[2005-12-10 18:56]" diff --git a/src/files.c b/src/files.c index 488fb60a..ad444f02 100644 --- a/src/files.c +++ b/src/files.c @@ -2611,13 +2611,36 @@ static void LoadLevel_InitElements(struct LevelInfo *level, char *filename) int element = EL_CUSTOM_START + i; struct ElementInfo *ei = &element_info[element]; - if (ei->access_direction == MV_NO_MOVING) + if (ei->access_direction == MV_NO_DIRECTIONS) ei->access_direction = MV_ALL_DIRECTIONS; +#if 0 + 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; + } +#endif + } + } + + /* correct custom element values (fix invalid values for all versions) */ + if (1) + { + for (i = 0; i < NUM_CUSTOM_ELEMENTS; i++) + { + int element = EL_CUSTOM_START + i; + struct ElementInfo *ei = &element_info[element]; + for (j = 0; j < ei->num_change_pages; j++) { struct ElementChangeInfo *change = &ei->change_page[j]; + if (change->trigger_player == CH_PLAYER_NONE) + change->trigger_player = CH_PLAYER_ANY; + if (change->trigger_side == CH_SIDE_NONE) change->trigger_side = CH_SIDE_ANY; }