2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-18 00:05:24 +00:00

Use EntityList instead of `rstl::resverved_vector<TUniqueId, 1024>' directly

This commit is contained in:
2021-06-06 17:07:45 -07:00
parent 5bfe881b95
commit 0b4f15341b
58 changed files with 184 additions and 183 deletions

View File

@@ -143,7 +143,7 @@ void CWarWasp::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EU
if (mgr.GetPlayer().GetMorphballTransitionState() != CPlayer::EPlayerMorphBallState::Morphed) {
zeus::CVector3f delta = aimPos - xf.origin;
if (delta.canBeNormalized()) {
rstl::reserved_vector<TUniqueId, kMaxEntities> nearList;
EntityList nearList;
TUniqueId bestId = kInvalidUniqueId;
CRayCastResult res = mgr.RayWorldIntersection(bestId, xf.origin, delta.normalized(), delta.magnitude(),
CMaterialFilter::MakeInclude({EMaterialTypes::Solid}), nearList);
@@ -360,7 +360,7 @@ bool CWarWasp::PathToHiveIsClear(CStateManager& mgr) const {
zeus::CVector3f delta = x3a0_latestLeashPosition - GetTranslation();
if (GetTransform().basis[1].dot(delta) > 0.f) {
zeus::CAABox aabb(GetTranslation() - 10.f, GetTranslation() + 10.f);
rstl::reserved_vector<TUniqueId, kMaxEntities> nearList;
EntityList nearList;
mgr.BuildNearList(nearList, aabb, CMaterialFilter::MakeInclude({EMaterialTypes::Character}), nullptr);
float deltaMagSq = delta.magSquared();
for (TUniqueId id : nearList) {
@@ -1140,7 +1140,7 @@ bool CWarWasp::ShouldFire(CStateManager& mgr, float arg) {
bool CWarWasp::ShouldDodge(CStateManager& mgr, float arg) {
zeus::CAABox aabb(GetTranslation() - 7.5f, GetTranslation() + 7.5f);
rstl::reserved_vector<TUniqueId, kMaxEntities> nearList;
EntityList nearList;
mgr.BuildNearList(nearList, aabb, CMaterialFilter::MakeInclude({EMaterialTypes::Projectile}), nullptr);
for (TUniqueId id : nearList) {
if (TCastToConstPtr<CGameProjectile> proj = mgr.GetObjectById(id)) {