From be2e24a2d66019f5f8e02bc340cd22ac2f9d693c Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 12 Apr 2022 22:48:54 +0200 Subject: [PATCH] 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". --- src/init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- 2.34.1