Update ZoneBuilder.cpp for building CoDOL Maps
AssetHandler::ModifyAsset checks the zone version and then applies a patch, this won't work with maps compiled with zonebuilder because the ff version is the same as other iw4 zones. Therefore the sortkey needs to be fixed when the map gets built instead of at runtime.
This commit is contained in:
parent
adee95a9de
commit
f2e373a793
@ -259,6 +259,23 @@ namespace Components
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//patch for codol maps dumped with zonetool, the FF version is changed, so the sortKey hack in AssetHandler::ModifyAsset won't work
|
||||||
|
if (type == Game::XAssetType::ASSET_TYPE_GFXWORLD)
|
||||||
|
{
|
||||||
|
if (assetHeader.gfxWorld->sortKeyDistortion == 44)
|
||||||
|
{
|
||||||
|
assetHeader.gfxWorld->sortKeyDistortion = 43;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//likewise if material's sortKey is 44, it needs to be changed to 43.
|
||||||
|
if (type == Game::XAssetType::ASSET_TYPE_MATERIAL)
|
||||||
|
{
|
||||||
|
if (assetHeader.material->info.sortKey == 44)
|
||||||
|
{
|
||||||
|
assetHeader.material->info.sortKey = 43;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Game::XAsset asset;
|
Game::XAsset asset;
|
||||||
asset.type = type;
|
asset.type = type;
|
||||||
asset.header = assetHeader;
|
asset.header = assetHeader;
|
||||||
|
Loading…
Reference in New Issue
Block a user