VC: Fix BFC for objects ignoring the exclusion list

This commit is contained in:
Silent 2024-05-18 22:39:36 +02:00
parent 5cb8fc1823
commit 758c21c821
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1

View File

@ -799,7 +799,10 @@ namespace SelectableBackfaceCulling
if (entityType == 4)
{
const Object* object = reinterpret_cast<const Object*>(entity);
return object->m_wCarPartModelIndex.Get() != -1 && object->m_objectCreatedBy == TEMP_OBJECT && object->bUseVehicleColours;
if (object->m_wCarPartModelIndex.Get() != -1 && object->m_objectCreatedBy == TEMP_OBJECT && object->bUseVehicleColours)
{
return true;
}
}
// For everything else, check the exclusion list
@ -840,7 +843,7 @@ namespace SVFReadyHook
if (model != nullptr)
{
uint16_t* flags = reinterpret_cast<uint16_t*>(static_cast<char*>(model) + 0x42);
*flags |= 0xC0;
*flags |= 0x40;
}
}
}