2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-18 02:05:23 +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

@@ -176,7 +176,7 @@ void CEnvFxManager::CalculateSnowForces(const CVectorFixed8_8& zVec,
}
}
void CEnvFxManager::BuildBlockObjectList(rstl::reserved_vector<TUniqueId, 1024>& list, CStateManager& mgr) {
void CEnvFxManager::BuildBlockObjectList(rstl::reserved_vector<TUniqueId, kMaxEntities>& list, CStateManager& mgr) {
for (CEntity* ent : mgr.GetAllObjectList()) {
const TCastToConstPtr<CScriptTrigger> trig = ent;
if (trig && True(trig->GetTriggerFlags() & ETriggerFlags::BlockEnvironmentalEffects)) {
@@ -197,7 +197,7 @@ void CEnvFxManager::UpdateBlockedGrids(CStateManager& mgr, EEnvFxType type, cons
zeus::CVector2i localPlayerPos((invXf * playerPos * 256.f).toVec2f());
x2c_lastBlockedGridIdx = -1;
x24_enableSplash = false;
rstl::reserved_vector<TUniqueId, 1024> blockList;
rstl::reserved_vector<TUniqueId, kMaxEntities> blockList;
bool blockListBuilt = false;
int blockedGrids = 0;
for (int i = 0; i < x50_grids.size(); ++i) {