This change is required for the case of custom graphics sets that
replace graphics by simply adding an image file with the same filename
as the default graphics, like "RocksElements.png", but without adding
changed graphics definitions in a "graphicsinfo.conf" config file.
This caused the new (custom) image file to be loaded instead of the
default image file, but did not mark the affected game graphics in the
custom image file to be "redefined" so far (which is required to
invalidate related action or direction graphics loaded from other
image files, which are now overridden by the new base graphics).
This change marks all graphics in such images files as "redefined".
char *basename = file_list_entry->filename;
char *filename = getCustomArtworkFilename(basename, artwork_info->type);
+ // mark all images from non-default graphics directory as "redefined"
+ if (artwork_info->type == ARTWORK_TYPE_GRAPHICS &&
+ !strPrefix(filename, options.graphics_directory))
+ file_list_entry->redefined = TRUE;
+
if (filename == NULL)
{
Warn("cannot find artwork file '%s'", basename);