From: Holger Schemel Date: Tue, 12 Apr 2022 20:48:54 +0000 (+0200) Subject: fixed compatibility handling for redefined old graphic "global.door" X-Git-Tag: 4.3.2.0~23 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=be2e24a2d66019f5f8e02bc340cd22ac2f9d693c;p=rocksndiamonds.git fixed compatibility handling for redefined old graphic "global.door" If old graphic "global.door" is redefined, all individual definitions accessing the same image file are changed to use the redefined image. However, this did not work correctly for graphic definitions which are cloned from other graphic definitions which are itself redefined and do not use the same graphic as "global.door" anymore. In this case, do not change these cloned graphics to use the redefined "global.door". --- diff --git a/src/init.c b/src/init.c index dbba5f12..b2b93715 100644 --- a/src/init.c +++ b/src/init.c @@ -1930,6 +1930,16 @@ static void InitGraphicCompatibilityInfo(void) // process all images which default to same image as "global.door" if (strEqual(fi->default_filename, fi_global_door->default_filename)) { + // skip all images that are cloned from images that default to same + // image as "global.door", but that are redefined to something else + if (graphic_info[i].clone_from != -1) + { + int cloned_graphic = graphic_info[i].clone_from; + + if (getImageListEntryFromImageID(cloned_graphic)->redefined) + continue; + } + #if 0 Debug("init:InitGraphicCompatibilityInfo", "special treatment needed for token '%s'", fi->token);