diff --git a/Runtime/MP1/World/CBabygoth.cpp b/Runtime/MP1/World/CBabygoth.cpp index d021b159d..12c1d1aeb 100644 --- a/Runtime/MP1/World/CBabygoth.cpp +++ b/Runtime/MP1/World/CBabygoth.cpp @@ -1103,12 +1103,13 @@ bool CBabygoth::Leash(CStateManager& mgr, float) { return false; } -bool CBabygoth::IsDestinationObstructed(CStateManager& mgr) { - for (CEntity* obj : mgr.GetListeningAiObjectList()) { - if (TCastToPtr ai = obj) { +bool CBabygoth::IsDestinationObstructed(const CStateManager& mgr) const { + for (const CEntity* obj : mgr.GetListeningAiObjectList()) { + if (const TCastToConstPtr ai = obj) { if (ai->GetAreaIdAlways() == GetAreaIdAlways()) { - if ((x8b8_backupDestPos - ai->GetTranslation()).magSquared() <= 10.f) + if ((x8b8_backupDestPos - ai->GetTranslation()).magSquared() <= 10.f) { return true; + } } } } diff --git a/Runtime/MP1/World/CBabygoth.hpp b/Runtime/MP1/World/CBabygoth.hpp index 0a8159faf..fec7ec593 100644 --- a/Runtime/MP1/World/CBabygoth.hpp +++ b/Runtime/MP1/World/CBabygoth.hpp @@ -160,7 +160,7 @@ private: void UpdateShellHealth(CStateManager&); - bool IsDestinationObstructed(CStateManager&); + bool IsDestinationObstructed(const CStateManager& mgr) const; void DestroyShell(CStateManager& mgr);