Fix loading of older OBJ8 CSL modelsets

- Fix support for older modelsets not using the texture for OBJ8 feature
- Small error when xsb_aircraft.txt was outside the object folder

ref T326
This commit is contained in:
Roland Winklmeier
2018-09-04 14:27:31 +02:00
committed by Klaus Basan
parent 00abf48047
commit d682df243a
2 changed files with 3 additions and 3 deletions

View File

@@ -481,8 +481,6 @@ namespace BlackMisc
}
package.planes.push_back(CSLPlane());
// Package name and object name uniquely identify an OBJ8 aircraft.
// File path just points to the package root.
return true;
}
@@ -521,6 +519,8 @@ namespace BlackMisc
if (tokens.size() >= 5)
{
// Load regular texture
// Replace package root dir again back to package name
dirNames.replace(0, package.name);
QString relativeTexPath = dirNames.join('/') + '/' + tokens[4];
normalizePath(relativeTexPath);
QString absoluteTexPath(relativeTexPath);