davewx7 / citadel

A turn based strategy game based on the Anura engine
Other
98 stars 25 forks source link

Particle system causing assertion failure when in game. #142

Closed ghost closed 6 years ago

ghost commented 6 years ago

I was writing a particle system, everything was going fine in the editor. To have some field perspective before committing, I assigned it to a creature. Everything was going fine, but something seems to happen when the creature dies.

2017-10-28 23:35:28.668 Frogatto[45655:3644465] ERROR: asserts.cpp:149 : ASSERT FAIL: 
variant_utils.cpp:277 ASSERTION FAILED: Trying to interpolate invalid variant values: {
    "max": 5.0,
    "min": 2.5,
    "type": "random"
} vs 0.0
2017-10-28 23:35:28.668 Frogatto[45655:3644465] CRITICAL: 
---

I wanted to share in case anyone wants to give some advice while I am diving into the problem. The interpolated value where the assertion is failing is... particle:info.emitter.emission_rate.

I hope is not a problem of configuring the creature card... I copied it over disease so Diseased Corpse shows it without no configuration and I was expecting this particle system to be as stable as the disease particle system.

ghost commented 6 years ago

Fixed by https://github.com/anura-engine/anura/commit/df7ccecf6bc1cbf885729a2039ab49a673f99e50.