From: Holger Schemel Date: Sat, 1 Jan 2005 18:34:07 +0000 (+0100) Subject: rnd-20050101-1-src X-Git-Tag: 3.1.1^2~35 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=341dd8cb9d8d33191f3eeda7eba45f02418d2819;p=rocksndiamonds.git rnd-20050101-1-src * level data now reset to defaults after attempt to load invalid file --- diff --git a/ChangeLog b/ChangeLog index 1364db0c..9a33a408 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-12-30 + * level data now reset to defaults after attempt to load invalid file + 2004-11-13 * added use of "editorsetup.conf" for different level sets diff --git a/src/conftime.h b/src/conftime.h index 58daaca4..5865410b 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2004-12-06 03:08]" +#define COMPILE_DATE_STRING "[2004-12-30 13:53]" diff --git a/src/files.c b/src/files.c index abcf15d2..02f79efb 100644 --- a/src/files.c +++ b/src/files.c @@ -2501,6 +2501,10 @@ void LoadLevelFromFileInfo(struct LevelInfo *level, break; } + /* if level file is invalid, restore level structure to default values */ + if (level->no_valid_file) + setLevelInfoToDefaults(level); + if (level->game_engine_type == GAME_ENGINE_TYPE_UNKNOWN) level->game_engine_type = GAME_ENGINE_TYPE_RND;