diff --git a/Runtime/Collision/CMetroidAreaCollider.cpp b/Runtime/Collision/CMetroidAreaCollider.cpp index 645626438..33f4227e2 100644 --- a/Runtime/Collision/CMetroidAreaCollider.cpp +++ b/Runtime/Collision/CMetroidAreaCollider.cpp @@ -211,7 +211,8 @@ static zeus::CVector3f ClipRayToPlane(const zeus::CVector3f& a, const zeus::CVec bool CMetroidAreaCollider::ConvexPolyCollision(const zeus::CPlane* planes, const zeus::CVector3f* verts, zeus::CAABox& aabb) { - rstl::reserved_vector vecs[2]; + /* FIXME: HACK: Increasing the size from 20 to 128 to give us more headroom, we should try and trim this back down to a more reasonable size */ + rstl::reserved_vector vecs[2]; g_CalledClip += 1; g_RejectedByClip -= 1; @@ -224,8 +225,8 @@ bool CMetroidAreaCollider::ConvexPolyCollision(const zeus::CPlane* planes, const int otherVecIdx = 1; for (int i=0 ; i<6 ; ++i) { - rstl::reserved_vector& vec = vecs[vecIdx]; - rstl::reserved_vector& otherVec = vecs[otherVecIdx]; + rstl::reserved_vector& vec = vecs[vecIdx]; + rstl::reserved_vector& otherVec = vecs[otherVecIdx]; otherVec.clear(); bool inFrontOf = planes[i].pointToPlaneDist(vec.front()) >= 0.f; @@ -245,7 +246,7 @@ bool CMetroidAreaCollider::ConvexPolyCollision(const zeus::CPlane* planes, const otherVecIdx ^= 1; } - rstl::reserved_vector& accumVec = vecs[otherVecIdx ^ 1]; + rstl::reserved_vector& accumVec = vecs[otherVecIdx ^ 1]; for (const zeus::CVector3f& point : accumVec) aabb.accumulateBounds(point); diff --git a/Runtime/GuiSys/CHudThreatInterface.cpp b/Runtime/GuiSys/CHudThreatInterface.cpp index 32c8e696c..ff696f1dc 100644 --- a/Runtime/GuiSys/CHudThreatInterface.cpp +++ b/Runtime/GuiSys/CHudThreatInterface.cpp @@ -231,7 +231,7 @@ void CHudThreatInterface::Update(float dt) color.a = x48_warningLerpAlpha * xc_damagePulse; x68_textpane_threatwarning->SetColor(color); } - if (x68_textpane_threatwarning->GetGeometryColor().a) + if (x68_textpane_threatwarning->GetGeometryColor().a > 0.f) x68_textpane_threatwarning->SetIsVisible(true); else x68_textpane_threatwarning->SetIsVisible(false); @@ -240,7 +240,7 @@ void CHudThreatInterface::Update(float dt) if (x4c_threatStatus == EThreatStatus::Damage) x50_warningColorLerp = std::min(x50_warningColorLerp + 2.f * dt, 1.f); else - x50_warningColorLerp = std::min(x50_warningColorLerp - 2.f * dt, 1.f); + x50_warningColorLerp = std::max(0.f, x50_warningColorLerp - 2.f * dt); } std::pair CHudThreatInterface::CombatThreatBarCoordFunc(float t)