Do not take headicons for reference even if they're using a nice tran… (#359)

* Do not take headicons for reference even if they're using a nice transparent techset

* Update IMaterial.cpp

Co-authored-by: rackover <roxanne@thegamebakers.com>
Co-authored-by: Edo <edoardo.sanguineti222@gmail.com>
This commit is contained in:
Louve
2022-07-16 13:54:20 +02:00
committed by GitHub
parent 06d935f584
commit e961f70fda

View File

@ -258,7 +258,8 @@ namespace Assets
{
Game::XAssetHeader header = entry->asset.header;
if (header.material->techniqueSet == iw4TechSet->asset.header.techniqueSet)
if (header.material->techniqueSet == iw4TechSet->asset.header.techniqueSet
&& !std::string(header.material->info.name).contains("icon")) // Yeah this has a tendency to fuck up a LOT of transparent materials
{
Components::Logger::Print("Material {} with techset {} has been mapped to {} (last chance!), taking the sort key of material {}\n",
asset->info.name, asset->techniqueSet->name, header.material->techniqueSet->name, header.material->info.name);