mirror of https://github.com/AxioDL/metaforce.git
CElementGen: Add activeParticleCount sanity check
This commit is contained in:
parent
a3628bebff
commit
5918daf818
|
@ -358,6 +358,11 @@ void CElementGen::AccumulateBounds(const zeus::CVector3f& pos, float size) {
|
|||
void CElementGen::UpdateAdvanceAccessParameters(u32 activeParticleCount, s32 particleFrame) {
|
||||
CGenDescription* desc = x28_loadedGenDesc;
|
||||
|
||||
if (activeParticleCount >= x60_advValues.size()) {
|
||||
Log.report(logvisor::Fatal, FMT_STRING("activeParticleCount ({}) >= advValues size ({})"),
|
||||
activeParticleCount, x60_advValues.size());
|
||||
}
|
||||
|
||||
std::array<float, 8>& arr = x60_advValues[activeParticleCount];
|
||||
CParticleGlobals::instance()->m_particleAccessParameters = &arr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue