Merge pull request #449 from OTHGMars/Zip_Test2

Loading from zipped game directories.
This commit is contained in:
Areloch 2021-07-17 11:03:19 -05:00 committed by GitHub
commit 4d40e3cab5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 280 additions and 259 deletions

View file

@ -698,11 +698,8 @@ AssetImportObject* AssetImporter::findImportingAssetByName(String assetName, Ass
ModuleDefinition* AssetImporter::getModuleFromPath(Torque::Path filePath)
{
//We want to ensure it's a full filepath, because the module system internally uses full paths for the module dirs
char fullPath[2048];
Platform::makeFullPathName(filePath.getFullPath().c_str(), fullPath, sizeof(fullPath));
ModuleDefinition* moduleDef = ModuleDatabase.findModuleByFilePath(StringTable->insert(fullPath));
// Use a relative path so modules on mounted file systems will be found.
ModuleDefinition* moduleDef = ModuleDatabase.findModuleByFilePath(Platform::makeRelativePathName(filePath.getFullPath().c_str(), NULL));
return moduleDef;
}