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

OpenGL memory leak fix

This commit is contained in:
Jack Andersen
2019-03-04 22:34:43 -10:00
parent ed4ebf0af1
commit 4b042f6f9a
3 changed files with 9 additions and 6 deletions

View File

@@ -255,7 +255,8 @@ void CScriptPlatform::Think(float dt, CStateManager& mgr) {
if (!x356_25_notAnimating)
UpdateAnimation(dt, mgr, true);
if (x356_28_rainSplashes && mgr.GetWorld()->GetNeededEnvFx() == EEnvFxType::Rain) {
if (HasModelData() && !GetModelData()->IsNull() && mgr.GetEnvFxManager()->GetRainMagnitude() != 0.f)
if (HasModelData() && !GetModelData()->IsNull() && mgr.GetEnvFxManager()->IsSplashActive() &&
mgr.GetEnvFxManager()->GetRainMagnitude() != 0.f)
mgr.GetActorModelParticles()->AddRainSplashGenerator(*this, mgr, x34c_maxRainSplashes, x350_rainGenRate, 0.f);
}
}