2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-20 07:45:26 +00:00

De-hardcode max entity count

This commit is contained in:
2021-06-06 16:53:41 -07:00
parent 89378700f7
commit 5f1aed51cb
64 changed files with 246 additions and 238 deletions

View File

@@ -984,7 +984,7 @@ bool CScriptGunTurret::LineOfSightTest(CStateManager& mgr) const {
zeus::CVector3f dir = mgr.GetPlayer().GetAimPosition(mgr, 0.f) - muzzlePos;
const float mag = dir.magnitude();
dir = dir / mag;
rstl::reserved_vector<TUniqueId, 1024> nearList;
rstl::reserved_vector<TUniqueId, kMaxEntities> nearList;
constexpr auto filter = CMaterialFilter::MakeIncludeExclude(
{EMaterialTypes::Solid}, {EMaterialTypes::Player, EMaterialTypes::CollisionActor});
mgr.BuildNearList(nearList, muzzlePos, dir, mag, filter, gun.GetPtr());