Only read clipmap models if we have a clipmap model count
This commit is contained in:
parent
aa85b95740
commit
ace08107fe
@ -885,6 +885,7 @@ namespace Assets
|
|||||||
|
|
||||||
// add triggers to mapEnts
|
// add triggers to mapEnts
|
||||||
if (version >= 2) {
|
if (version >= 2) {
|
||||||
|
if (clipMap->numSubModels > 0) {
|
||||||
clipMap->mapEnts->trigger.count = clipMap->numSubModels;
|
clipMap->mapEnts->trigger.count = clipMap->numSubModels;
|
||||||
clipMap->mapEnts->trigger.hullCount = clipMap->numSubModels;
|
clipMap->mapEnts->trigger.hullCount = clipMap->numSubModels;
|
||||||
|
|
||||||
@ -909,6 +910,7 @@ namespace Assets
|
|||||||
clipMap->mapEnts->trigger.hulls = &hulls[0];
|
clipMap->mapEnts->trigger.hulls = &hulls[0];
|
||||||
clipMap->mapEnts->trigger.slabs = &slabs[0];
|
clipMap->mapEnts->trigger.slabs = &slabs[0];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
clipMap->checksum = reader.read<int>();
|
clipMap->checksum = reader.read<int>();
|
||||||
|
|
||||||
|
@ -222,8 +222,14 @@ namespace Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
Game::XAssetHeader assetHeader = AssetHandler::FindAssetForZone(type, name, this, isSubAsset);
|
Game::XAssetHeader assetHeader = AssetHandler::FindAssetForZone(type, name, this, isSubAsset);
|
||||||
|
|
||||||
|
if (type == Game::XAssetType::ASSET_TYPE_LOADED_SOUND) {
|
||||||
|
Logger::Print("Loading loaded_sound '%s'\n", name.data());
|
||||||
|
}
|
||||||
|
|
||||||
if (!assetHeader.data)
|
if (!assetHeader.data)
|
||||||
{ Logger::Error("Error: Missing asset '%s' of type '%s'\n", name.data(), Game::DB_GetXAssetTypeName(type));
|
{
|
||||||
|
Logger::Error("Error: Missing asset '%s' of type '%s'\n", name.data(), Game::DB_GetXAssetTypeName(type));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user