Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde

This commit is contained in:
Jack Andersen 2018-05-24 20:40:18 -10:00
commit 98549a7785
2 changed files with 7 additions and 6 deletions

View File

@ -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<zeus::CVector3f, 20> 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<zeus::CVector3f, 128> 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<zeus::CVector3f, 20>& vec = vecs[vecIdx];
rstl::reserved_vector<zeus::CVector3f, 20>& otherVec = vecs[otherVecIdx];
rstl::reserved_vector<zeus::CVector3f, 128>& vec = vecs[vecIdx];
rstl::reserved_vector<zeus::CVector3f, 128>& 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<zeus::CVector3f, 20>& accumVec = vecs[otherVecIdx ^ 1];
rstl::reserved_vector<zeus::CVector3f, 128>& accumVec = vecs[otherVecIdx ^ 1];
for (const zeus::CVector3f& point : accumVec)
aabb.accumulateBounds(point);

View File

@ -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<zeus::CVector3f, zeus::CVector3f> CHudThreatInterface::CombatThreatBarCoordFunc(float t)