Skip to content

Commit

Permalink
Fix: Show particles only from the enabled particles effects
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe-Devr committed Jul 12, 2024
1 parent a53cb51 commit 3730a39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/world/src/components/entity/effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class EntityEffectsComponent extends EntityComponent {
0n
) {
// Get all the effects
const effects = [...this.effects.values()];
const effects = [...this.effects.values()].filter(
(effect) => effect.showParticles
);
// Select randomly an effect
const randomEffect =
effects[Math.floor(Math.random() * effects.length)];
Expand Down

0 comments on commit 3730a39

Please sign in to comment.