[IMapEnts] Use IW4C if available

This commit is contained in:
momo5502 2016-12-31 15:53:48 +01:00
parent aafa121ff1
commit 6e689766df

View File

@ -15,6 +15,10 @@ namespace Assets
Game::MapEnts* orgEnts = Components::AssetHandler::FindOriginalAsset(this->getType(), name.data()).mapEnts; Game::MapEnts* orgEnts = Components::AssetHandler::FindOriginalAsset(this->getType(), name.data()).mapEnts;
// TODO: Get rid of that // TODO: Get rid of that
if (!orgEnts)
{
orgEnts = Components::AssetHandler::FindOriginalAsset(Game::XAssetType::ASSET_TYPE_MAP_ENTS, "maps/iw4_credits.d3dbsp").mapEnts;
if (!orgEnts) if (!orgEnts)
{ {
Game::DB_EnumXAssets(Game::XAssetType::ASSET_TYPE_MAP_ENTS, [](Game::XAssetHeader header, void* mapEnts) Game::DB_EnumXAssets(Game::XAssetType::ASSET_TYPE_MAP_ENTS, [](Game::XAssetHeader header, void* mapEnts)
@ -25,6 +29,7 @@ namespace Assets
} }
}, &orgEnts, false); }, &orgEnts, false);
} }
}
if (orgEnts) if (orgEnts)
{ {