diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-26 16:09:40 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-26 16:09:40 +1000 |
commit | d5d474c673ff15cdefb1ce057b072688dd639acf (patch) | |
tree | bd36dcba495d4059206820141645f8f3638a4df0 /source/game/StarParticle.cpp | |
parent | ec9a138e1acb648b7eb1da44e081553a1586185b (diff) |
Fix particles finally
Diffstat (limited to 'source/game/StarParticle.cpp')
-rw-r--r-- | source/game/StarParticle.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/game/StarParticle.cpp b/source/game/StarParticle.cpp index 82c63c6..7b2240b 100644 --- a/source/game/StarParticle.cpp +++ b/source/game/StarParticle.cpp @@ -66,14 +66,16 @@ Particle::Particle(Json const& config, String const& path) { if (type == Type::Textured || type == Type::Animated) string = AssetPath::relativeTo(path, string); - if (type == Type::Animated) - initializeAnimation(); + image = string; - auto pathEnd = string.find('?'); - if (pathEnd == NPos) - directives = ""; - else - directives.parse(string.substr(pathEnd)); + if (type == Type::Animated) { + auto pathEnd = string.find('?'); + if (pathEnd == NPos) + directives.clear(); + else + directives = string.substr(pathEnd); + initializeAnimation(); + } if (config.contains("color")) color = jsonToColor(config.get("color")); |