2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Space pirate bug fixes

This commit is contained in:
Jack Andersen
2018-12-14 20:29:41 -10:00
parent ccf87925b9
commit dac8fc3eb5
32 changed files with 294 additions and 210 deletions

View File

@@ -56,6 +56,7 @@
#include "hecl/CVarManager.hpp"
#include "World/CPatterned.hpp"
#include "World/CDestroyableRock.hpp"
#include "World/CPathFindSearch.hpp"
#include <cmath>
namespace urde {
@@ -515,7 +516,15 @@ void CStateManager::BuildDynamicLightListForWorld() {
}
}
void CStateManager::DrawDebugStuff() const {}
void CStateManager::DrawDebugStuff() const {
for (CEntity* ent : GetActorObjectList()) {
if (TCastToPtr<CPatterned> ai = ent) {
if (CPathFindSearch* path = ai->GetSearchPath()) {
path->DebugDraw();
}
}
}
}
void CStateManager::RenderCamerasAndAreaLights() const {
x870_cameraManager->RenderCameras(*this);
@@ -1558,8 +1567,8 @@ bool CStateManager::ApplyLocalDamage(const zeus::CVector3f& pos, const zeus::CVe
}
float newHp = hInfo->GetHP() - mulDam;
hInfo->SetHP(newHp);
bool significant = std::fabs(newHp - hInfo->GetHP()) >= 0.00001;
hInfo->SetHP(newHp);
if (player && GetPlayerState()->CanTakeDamage()) {
player->TakeDamage(significant, pos, mulDam, weapMode.GetType(), *this);