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

Runtime: Correct TCastTo<CAi> to TCastTo<CPatterned>

This commit is contained in:
2022-08-16 17:48:26 -04:00
parent 9d5db8ea16
commit 148e9e4bd8
11 changed files with 20 additions and 19 deletions

View File

@@ -603,9 +603,9 @@ bool CMetroidPrimeEssence::sub8027e870(const zeus::CTransform& xf, CStateManager
void CMetroidPrimeEssence::KillAiInArea(CStateManager& mgr) {
for (auto* ent : mgr.GetListeningAiObjectList()) {
if (TCastToPtr<CAi> ai = ent) {
if (TCastToPtr<CPatterned> ai = ent) {
if (ai != this && ai->GetActive() && ai->GetAreaIdAlways() == GetAreaIdAlways()) {
static_cast<CPatterned*>(ai.GetPtr())->MassiveDeath(mgr);
ai->MassiveDeath(mgr);
}
}
}
@@ -614,7 +614,7 @@ void CMetroidPrimeEssence::KillAiInArea(CStateManager& mgr) {
void CMetroidPrimeEssence::CountListeningAi(CStateManager& mgr) {
x6e0_ = 0;
for (auto* ent : mgr.GetListeningAiObjectList()) {
if (TCastToPtr<CAi> ai = ent) {
if (TCastToPtr<CPatterned> ai = ent) {
if (ai != this && ai->GetActive() && ai->GetAreaIdAlways() == GetAreaIdAlways()) {
++x6e4_;
}