From 758c21c821ee1cd6705ea16b09308174c235be6d Mon Sep 17 00:00:00 2001 From: Silent Date: Sat, 18 May 2024 22:39:36 +0200 Subject: [PATCH] VC: Fix BFC for objects ignoring the exclusion list --- SilentPatchVC/SilentPatchVC.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SilentPatchVC/SilentPatchVC.cpp b/SilentPatchVC/SilentPatchVC.cpp index 0e2dc29..2d48e29 100644 --- a/SilentPatchVC/SilentPatchVC.cpp +++ b/SilentPatchVC/SilentPatchVC.cpp @@ -799,7 +799,10 @@ namespace SelectableBackfaceCulling if (entityType == 4) { const Object* object = reinterpret_cast(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(static_cast(model) + 0x42); - *flags |= 0xC0; + *flags |= 0x40; } } }