2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 13:07:42 +00:00

CActorContraption fixes, better CMake dependency handling

This commit is contained in:
Jack Andersen
2019-06-11 16:05:17 -10:00
parent 77d0ef942d
commit e218b8aeb5
295 changed files with 942 additions and 2219 deletions

View File

@@ -361,7 +361,7 @@ void CSamusHud::UpdateEnergy(float dt, const CStateManager& mgr, bool init) {
while (curLastTankEnergy > CPlayerState::GetBaseHealthCapacity())
curLastTankEnergy -= CPlayerState::GetEnergyTankCapacity();
x28c_energyIntf->SetCurrEnergy(lastTankEnergy,
curLastTankEnergy > lastTankEnergy != x2d0_playerHealth > energy);
(curLastTankEnergy > lastTankEnergy) != (x2d0_playerHealth > energy));
}
x2d0_playerHealth = energy;
if (x28c_energyIntf) {
@@ -520,7 +520,7 @@ void CSamusHud::UpdateThreatAssessment(float dt, const CStateManager& mgr) {
CPlayer& player = mgr.GetPlayer();
zeus::CAABox playerAABB = zeus::skNullBox;
if (rstl::optional<zeus::CAABox> aabb = player.GetTouchBounds())
if (std::optional<zeus::CAABox> aabb = player.GetTouchBounds())
playerAABB = *aabb;
zeus::CAABox aabb;
@@ -537,7 +537,7 @@ void CSamusHud::UpdateThreatAssessment(float dt, const CStateManager& mgr) {
continue;
if (trigger->GetDamageInfo().GetDamage() == 0.f)
continue;
if (rstl::optional<zeus::CAABox> aabb = trigger->GetTouchBounds()) {
if (std::optional<zeus::CAABox> aabb = trigger->GetTouchBounds()) {
float dist = playerAABB.distanceBetween(*aabb);
if (dist < threatDist)
threatDist = dist;