diff --git a/Runtime/World/CGameArea.hpp b/Runtime/World/CGameArea.hpp index 31623d90b..ea0ae48c0 100644 --- a/Runtime/World/CGameArea.hpp +++ b/Runtime/World/CGameArea.hpp @@ -347,11 +347,8 @@ public: s32 GetDockCount() const { return xcc_docks.size(); } bool IsPostConstructed() const { return xf0_24_postConstructed; } - const CPostConstructed* GetPostConstructed() const { - if (!x12c_postConstructed) - return nullptr; - return x12c_postConstructed.get(); - } + CPostConstructed* GetPostConstructed() { return x12c_postConstructed.get(); } + const CPostConstructed* GetPostConstructed() const { return x12c_postConstructed.get(); } bool IsValidated() const { return xf0_28_validated; } diff --git a/Runtime/World/CScriptPlayerActor.cpp b/Runtime/World/CScriptPlayerActor.cpp index 206d1f3d4..781d72767 100644 --- a/Runtime/World/CScriptPlayerActor.cpp +++ b/Runtime/World/CScriptPlayerActor.cpp @@ -211,8 +211,8 @@ void CScriptPlayerActor::Think(float dt, CStateManager& mgr) { if (x354_29_loading && !x354_28_suitModelLoading && !x354_27_beamModelLoading && x64_modelData && !x64_modelData->IsNull() && x64_modelData->IsLoaded(0)) { if (x355_24_areaTrackingLoad) { - const CGameArea* area = mgr.GetWorld()->GetAreaAlways(x4_areaId); - --const_cast(area->GetPostConstructed())->x113c_playerActorsLoading; + CGameArea* area = mgr.GetWorld()->GetArea(x4_areaId); + --area->GetPostConstructed()->x113c_playerActorsLoading; x355_24_areaTrackingLoad = false; } x354_29_loading = false; @@ -285,8 +285,8 @@ void CScriptPlayerActor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid case EScriptObjectMessage::InitializedInArea: x354_31_deferOnlineLoad = true; if (x350_flags & 0x8) { - const CGameArea* area = mgr.GetWorld()->GetAreaAlways(x4_areaId); - ++const_cast(area->GetPostConstructed())->x113c_playerActorsLoading; + CGameArea* area = mgr.GetWorld()->GetArea(x4_areaId); + ++area->GetPostConstructed()->x113c_playerActorsLoading; x355_24_areaTrackingLoad = true; } if (GetActive()) {