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:
@@ -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_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user