mirror of https://github.com/OpenTTD/OpenTTD
(svn r16538) -Fix (r16503): when finding duplicate graphics sets favour the more complete one
parent
050bbb4dac
commit
afdeab52ab
|
@ -467,7 +467,9 @@ bool OBGFileScanner::AddFile(const char *filename, size_t basepath_length)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (duplicate != NULL) {
|
if (duplicate != NULL) {
|
||||||
if (duplicate->version >= graphics->version) {
|
/* The more complete graphics set takes precedence over the version number. */
|
||||||
|
if ((duplicate->files == graphics->files && duplicate->version >= graphics->version) ||
|
||||||
|
duplicate->files > graphics->files) {
|
||||||
DEBUG(grf, 1, "Not adding %s (%i) as base graphics set (duplicate)", graphics->name, graphics->version);
|
DEBUG(grf, 1, "Not adding %s (%i) as base graphics set (duplicate)", graphics->name, graphics->version);
|
||||||
delete graphics;
|
delete graphics;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue