From: Holger Schemel Date: Fri, 24 Nov 2017 20:12:42 +0000 (+0100) Subject: changed handling artwork info cache to allow partial (default) entries X-Git-Tag: 4.1.0.0~46 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=79425634;p=rocksndiamonds.git changed handling artwork info cache to allow partial (default) entries --- diff --git a/src/libgame/setup.c b/src/libgame/setup.c index f28df34f..f2f5984f 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -2820,22 +2820,13 @@ static TreeInfo *getArtworkInfoCacheEntry(LevelDirTree *level_node, int type) char *token = getCacheToken(token_prefix, artworkinfo_tokens[i].text); char *value = getHashEntry(artworkinfo_cache_old, token); - setSetupInfo(artworkinfo_tokens, i, value); - - /* check if cache entry for this item is invalid or incomplete */ - if (value == NULL) - { - Error(ERR_WARN, "cache entry '%s' invalid", token); - - cached = FALSE; - } + /* if defined, use value from cache, else keep default value */ + if (value != NULL) + setSetupInfo(artworkinfo_tokens, i, value); } *artwork_info = ldi; - } - if (cached) - { char *filename_levelinfo = getPath2(getLevelDirFromTreeInfo(level_node), LEVELINFO_FILENAME); char *filename_artworkinfo = getPath2(getSetupArtworkDir(artwork_info),