Fix Global SDF update when changing Draw Modes of the model

Refactor `DrawModes` field in `StaticModel` and `FoliageType` into property with getter/setter

#3949
This commit is contained in:
Wojtek Figat
2026-03-11 16:01:56 +01:00
parent 479c5f896c
commit 96bbae8e28
7 changed files with 79 additions and 27 deletions

View File

@@ -408,7 +408,8 @@ public:
if (GLOBAL_SDF_ACTOR_IS_STATIC(a) && ObjectTypes.Contains(a->GetTypeHandle()))
{
ScopeWriteLock lock(Locker);
OnSceneRenderingDirty(BoundingBox::FromSphere(prevBounds));
if (flags != DrawModes && flags != Layer && flags != StaticFlags)
OnSceneRenderingDirty(BoundingBox::FromSphere(prevBounds));
OnSceneRenderingDirty(a->GetBox());
}
}