Fix assets being added to their pools twice when loaded from a fastfile

This commit is contained in:
Jan 2020-10-25 11:41:26 +01:00
parent 6cca00b8d8
commit a925bd505d
2 changed files with 2 additions and 12 deletions

View File

@ -269,12 +269,7 @@ XAssetInfoGeneric* GameAssetPoolIW4::AddAssetToPool(asset_type_t type, std::stri
case assetType: \ case assetType: \
{ \ { \
assert((poolName) != nullptr); \ assert((poolName) != nullptr); \
auto* assetInfo = (poolName)->AddAsset(std::move(name), xAsset.header.headerName, m_zone, dependencies); \ return (poolName)->AddAsset(std::move(name), xAsset.header.headerName, m_zone, dependencies); \
if(assetInfo) \
{ \
m_assets_in_order.push_back(assetInfo); \
} \
return assetInfo; \
} }
switch (xAsset.type) switch (xAsset.type)

View File

@ -338,12 +338,7 @@ XAssetInfoGeneric* GameAssetPoolT6::AddAssetToPool(asset_type_t type, std::strin
case assetType: \ case assetType: \
{ \ { \
assert((poolName) != nullptr); \ assert((poolName) != nullptr); \
auto* assetInfo = (poolName)->AddAsset(std::move(name), xAsset.header.headerName, m_zone, dependencies); \ return (poolName)->AddAsset(std::move(name), xAsset.header.headerName, m_zone, dependencies); \
if(assetInfo) \
{ \
m_assets_in_order.push_back(assetInfo); \
} \
return assetInfo; \
} }
switch (xAsset.type) switch (xAsset.type)