diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-26 02:03:50 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-26 02:03:50 +1000 |
commit | 79c5012033935b54d6ef94b2830aed12f92811c1 (patch) | |
tree | 38ee77e41c73be2954a5bc4a2881d4083347bb8d /source/game/StarParticle.cpp | |
parent | 500e81329a411b3a6df6e300beab68418dc00658 (diff) |
fix Particles not being drawn with the new image member
Diffstat (limited to 'source/game/StarParticle.cpp')
-rw-r--r-- | source/game/StarParticle.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/game/StarParticle.cpp b/source/game/StarParticle.cpp index ad0c168..82c63c6 100644 --- a/source/game/StarParticle.cpp +++ b/source/game/StarParticle.cpp @@ -42,6 +42,7 @@ Particle::Particle() { length = 0; destructionAction = DestructionAction::None; destructionTime = 0.0f; + destructionSet = false; trail = false; flippable = true; flip = false; @@ -224,13 +225,16 @@ void Particle::destructionUpdate() { } else if (destructionAction == DestructionAction::Fade) { color.setAlphaF(destructionFactor); } else if (destructionAction == DestructionAction::Image) { - size = 1.0f; - color = Color::White; - type = Particle::Type::Textured; - image = destructionImage; - angularVelocity = 0.0f; - length = 0.0f; - rotation = 0.0f; + if (!destructionSet) { + size = 1.0f; + color = Color::White; + type = Particle::Type::Textured; + image = destructionImage; + angularVelocity = 0.0f; + length = 0.0f; + rotation = 0.0f; + destructionSet = true; + } } } } |