fixed compatibility handling for redefined old graphic "global.door"
[rocksndiamonds.git] / src / init.c
index dbba5f1250154305c8c1412d8ab0255326a72907..b2b93715e3cee12b0aaac719781a5843af10ecfd 100644 (file)
@@ -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);