diff --git a/Runtime/World/CEnvFxManager.cpp b/Runtime/World/CEnvFxManager.cpp index 9e6b9bba1..d6e43acb9 100644 --- a/Runtime/World/CEnvFxManager.cpp +++ b/Runtime/World/CEnvFxManager.cpp @@ -178,10 +178,10 @@ void CEnvFxManager::CalculateSnowForces(const CVectorFixed8_8& zVec, void CEnvFxManager::BuildBlockObjectList(rstl::reserved_vector& list, CStateManager& mgr) { for (CEntity* ent : mgr.GetAllObjectList()) { - TCastToPtr trig = ent; + const TCastToConstPtr trig = ent; if (trig && True(trig->GetTriggerFlags() & ETriggerFlags::BlockEnvironmentalEffects)) { list.push_back(ent->GetUniqueId()); - } else if (TCastToPtr water = ent) { + } else if (TCastToConstPtr(ent)) { list.push_back(ent->GetUniqueId()); } }