[IMaterial] Correctly load images

This commit is contained in:
momo5502 2016-12-27 04:22:20 +01:00
parent 1861f9eb21
commit 803596214d

View File

@ -45,7 +45,7 @@ namespace Assets
material->cameraRegion = reader.readByte(); material->cameraRegion = reader.readByte();
std::string techset = reader.readString(); std::string techset = reader.readString();
material->techniqueSet = Components::AssetHandler::FindOriginalAsset(Game::XAssetType::ASSET_TYPE_TECHSET, techset.data()).techniqueSet; material->techniqueSet = Components::AssetHandler::FindAssetForZone(Game::XAssetType::ASSET_TYPE_TECHSET, techset.data(), builder).techniqueSet;
if (!material->techniqueSet) if (!material->techniqueSet)
{ {
@ -91,11 +91,11 @@ namespace Assets
material->textureTable[i].info.water->codeConstant[1] = reader.read<float>(); material->textureTable[i].info.water->codeConstant[1] = reader.read<float>();
material->textureTable[i].info.water->codeConstant[2] = reader.read<float>(); material->textureTable[i].info.water->codeConstant[2] = reader.read<float>();
material->textureTable[i].info.water->codeConstant[3] = reader.read<float>(); material->textureTable[i].info.water->codeConstant[3] = reader.read<float>();
material->textureTable[i].info.water->image = Components::AssetHandler::FindOriginalAsset(Game::XAssetType::ASSET_TYPE_IMAGE, reader.readCString()).image; material->textureTable[i].info.water->image = Components::AssetHandler::FindAssetForZone(Game::XAssetType::ASSET_TYPE_IMAGE, reader.readString().data(), builder).image;
} }
else else
{ {
material->textureTable[i].info.image = Components::AssetHandler::FindOriginalAsset(Game::XAssetType::ASSET_TYPE_IMAGE, reader.readCString()).image; material->textureTable[i].info.image = Components::AssetHandler::FindAssetForZone(Game::XAssetType::ASSET_TYPE_IMAGE, reader.readString().data(), builder).image;
} }
} }