diff --git a/Runtime/MP1/World/CBloodFlower.cpp b/Runtime/MP1/World/CBloodFlower.cpp index 5c50d1a26..a39655d77 100644 --- a/Runtime/MP1/World/CBloodFlower.cpp +++ b/Runtime/MP1/World/CBloodFlower.cpp @@ -224,8 +224,9 @@ void CBloodFlower::PodAttack(CStateManager& mgr, EStateMsg msg, float arg) { x574_podEffect->SetParticleEmission(true); ActivateTriggers(mgr, true); } else if (msg == EStateMsg::Update) { - if (TooClose(mgr, 0.f)) + if (!TooClose(mgr, 0.f)) { return; + } mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), x5f8_podDamage, CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), {}); diff --git a/Runtime/MP1/World/CIceSheegoth.cpp b/Runtime/MP1/World/CIceSheegoth.cpp index ac3b4807a..df5da2bee 100644 --- a/Runtime/MP1/World/CIceSheegoth.cpp +++ b/Runtime/MP1/World/CIceSheegoth.cpp @@ -1009,14 +1009,16 @@ void CIceSheegoth::ApplyContactDamage(TUniqueId sender, CStateManager& mgr) { if (colAct->GetHealthInfo(mgr)->GetHP() <= 0.f) { return; } - bool bVar5 = (xb28_29_ && !xb28_25_ && xb28_28_) ? true : IsMouthCollider(sender); + bool bite = (xb28_29_ && !xb28_25_ && xb28_28_) ? true : IsMouthCollider(sender); if (colAct->GetLastTouchedObject() == mgr.GetPlayer().GetUniqueId()) { - if (bVar5) { - mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), x56c_sheegothData.Get_x1b8(), - CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), zeus::skZero3f); + if (!bite) { + if (x420_curDamageRemTime <= 0.f) { + mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), GetContactDamage(), + CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), zeus::skZero3f); + } } else { - mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), GetContactDamage(), + mgr.ApplyDamage(GetUniqueId(), mgr.GetPlayer().GetUniqueId(), GetUniqueId(), x56c_sheegothData.Get_x1b8(), CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid}, {}), zeus::skZero3f); } } diff --git a/Runtime/MP1/World/CMetroidPrimeExo.cpp b/Runtime/MP1/World/CMetroidPrimeExo.cpp index 3c99b492a..b091a9b86 100644 --- a/Runtime/MP1/World/CMetroidPrimeExo.cpp +++ b/Runtime/MP1/World/CMetroidPrimeExo.cpp @@ -1815,11 +1815,11 @@ void CMetroidPrimeExo::UpdateBoneTracking(float dt, CStateManager& mgr) { } void CMetroidPrimeExo::DoContactDamage(TUniqueId uid, CStateManager& mgr) { - if (TCastToConstPtr colAct = mgr.GetObjectById(uid)) { - if (!IsAlive()) { - return; - } + if (!IsAlive()) { + return; + } + if (TCastToConstPtr colAct = mgr.GetObjectById(uid)) { if (colAct->GetLastTouchedObject() == mgr.GetPlayer().GetUniqueId()) { if (mgr.GetPlayer().GetFrozenState()) { mgr.GetPlayer().UnFreeze(mgr); diff --git a/Runtime/MP1/World/CRidley.cpp b/Runtime/MP1/World/CRidley.cpp index 6003d12f2..5114a3ab0 100644 --- a/Runtime/MP1/World/CRidley.cpp +++ b/Runtime/MP1/World/CRidley.cpp @@ -539,9 +539,11 @@ void CRidley::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateMan TUniqueId tmpId = kInvalidUniqueId; bool doDamage = false; if (xc64_aiStage == 3) { - if (!xa32_29_ && xa31_27_) { - tmpId = x98a_breastPlateId; - doDamage = true; + if (!xa32_29_) { + if (xa31_27_) { + tmpId = x98a_breastPlateId; + doDamage = true; + } } else { tmpId = x988_headId; doDamage = true; diff --git a/Runtime/MP1/World/CThardus.cpp b/Runtime/MP1/World/CThardus.cpp index 8c8492d13..c01605dc6 100644 --- a/Runtime/MP1/World/CThardus.cpp +++ b/Runtime/MP1/World/CThardus.cpp @@ -209,7 +209,7 @@ void CThardus::UpdateRockThermalState(float dt, CStateManager& mgr) { void CThardus::sub801de9f8(CStateManager& mgr) { float dVar5 = mgr.GetActiveRandom()->Float(); - if (!sub801dc2c8() || dVar5 >= 0.3f) { + if (!IsLastRock() || dVar5 >= 0.3f) { const float local_28 = std::max(0.f, dVar5 - 0.19999999f); if (local_28 > 0.8f) { x5c4_ = 2; @@ -282,7 +282,7 @@ void CThardus::sub801dcfa4(CStateManager& mgr) { ProcessSoundEvent(x758_, 1.f, 0, 0.1f, 1000.f, 0.16f, 1.f, zeus::skZero3f, GetTranslation(), mgr.GetNextAreaId(), mgr, true); - if (sub801dc2c8() && !x8f0_) { + if (IsLastRock() && !x8f0_) { DoDoubleSnap(mgr); } sub801dbc40(); @@ -317,7 +317,7 @@ void CThardus::Think(float dt, CStateManager& mgr) { UpdateRockThermalState(dt, mgr); - if (!sub801dc2c8()) { + if (!IsLastRock()) { // NOTE: (phil), yes this is what's actually happening #if 0 if (x648_currentRock < x610_destroyableRocks.size() - 2) { diff --git a/Runtime/MP1/World/CThardus.hpp b/Runtime/MP1/World/CThardus.hpp index 363492734..b231afefd 100644 --- a/Runtime/MP1/World/CThardus.hpp +++ b/Runtime/MP1/World/CThardus.hpp @@ -146,7 +146,7 @@ class CThardus : public CPatterned { if (x578_waypoints.empty()) { sub801de9f8(mgr); } else { - if (sub801dc2c8() || x5c4_ != 0 || x944_ <= 0.f) + if (IsLastRock() || x5c4_ != 0 || x944_ <= 0.f) sub801de9f8(mgr); else x944_ = 0.f; @@ -157,7 +157,7 @@ class CThardus : public CPatterned { void SetRockParticle(CStateManager& mgr, const zeus::CVector3f& pos, CAssetId particle); void sub801dbc5c(CStateManager& mgr, CDestroyableRock* rock); void sub801dbbdc(CStateManager& mgr, CDestroyableRock* rock); - bool sub801dc2c8() { return x648_currentRock == (x610_destroyableRocks.size() - 1); } + bool IsLastRock() { return x648_currentRock == (x610_destroyableRocks.size() - 1); } void UpdateNonDestroyableCollisionActorMaterials(EUpdateMaterialMode mode, EMaterialTypes mat, CStateManager& mgr); void UpdateExcludeList(const std::unique_ptr& colMgr, EUpdateMaterialMode mode, EMaterialTypes mat, CStateManager& mgr); diff --git a/Runtime/World/CGameArea.cpp b/Runtime/World/CGameArea.cpp index a4626307b..34cefe4db 100644 --- a/Runtime/World/CGameArea.cpp +++ b/Runtime/World/CGameArea.cpp @@ -853,8 +853,8 @@ void CGameArea::Validate(CStateManager& mgr) { while (StartStreamingMainArea()) {} - for (auto& req : xf8_loadTransactions) - req->WaitUntilComplete(); + //for (auto& req : xf8_loadTransactions) + // req->WaitUntilComplete(); if (xdc_tokens.empty()) { VerifyTokenList(mgr);