From 311a827ade49b0a299fc262e9923861f47d058a0 Mon Sep 17 00:00:00 2001 From: Hirek Date: Thu, 21 Aug 2025 20:31:26 +0200 Subject: [PATCH] Fix c++ error --- particles.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/particles.cpp b/particles.cpp index 361f2b8c..58bc2f22 100644 --- a/particles.cpp +++ b/particles.cpp @@ -474,7 +474,10 @@ particle_manager::find( std::string const &Template ) { } // ... and if it fails try to add the template to the database from a data file smoke_source source; - if( source.deserialize( cParser( templatepath + templatename + ".txt", cParser::buffer_FILE ) ) ) { + cParser parser(templatepath + templatename + ".txt", cParser::buffer_FILE); + + if (source.deserialize(parser)) + { // if deserialization didn't fail finish source setup... source.m_opacitymodifier.bind( &Global.SmokeFidelity ); // ...then cache the source as template for future instances