From 057175192217448d8b28456a0c34d1b494f91506 Mon Sep 17 00:00:00 2001 From: Mike Lester Date: Wed, 1 Jan 2025 16:12:14 -0700 Subject: [PATCH] Wind Waker: Fix common particles spawning once on scene creation --- src/ZeldaWindWaker/d_particle.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ZeldaWindWaker/d_particle.ts b/src/ZeldaWindWaker/d_particle.ts index 96335165f..d0d6c07bf 100644 --- a/src/ZeldaWindWaker/d_particle.ts +++ b/src/ZeldaWindWaker/d_particle.ts @@ -270,6 +270,8 @@ class dPa_simpleEcallBack extends JPAEmitterCallBack { if(this.baseEmitter) { this.baseEmitter.drawGroupId = groupID; this.baseEmitter.emitterCallBack = this; + this.baseEmitter.maxFrame = 0; + this.baseEmitter.stopCreateParticle(); // From dPa_simpleEcallBack::draw(). Fixup TEV settings for particles that access the framebuffer. if (groupID == ParticleGroup.Projection) { @@ -307,7 +309,7 @@ class dPa_simpleEcallBack extends JPAEmitterCallBack { emitter.playCreateParticle(); for(let simple of this.datas) { // TODO: Frustum culling - vec3.copy(workData.emitterTranslation, simple.pos); + emitter.setGlobalTranslation(workData.emitterTranslation); colorCopy(emitter.globalColorPrm, simple.prmColor); colorCopy(emitter.globalColorEnv, simple.envColor); for (let i = 0; i < emitThisFrame; i++) {