Skip to content

Commit

Permalink
Wind Waker: Fix common particles spawning once on scene creation
Browse files Browse the repository at this point in the history
  • Loading branch information
themikelester committed Jan 1, 2025
1 parent 8b055af commit 0571751
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ZeldaWindWaker/d_particle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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++) {
Expand Down

0 comments on commit 0571751

Please sign in to comment.