16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-17 23:39:18 +02:00

Fix c++ error

This commit is contained in:
2025-08-21 20:31:26 +02:00
parent 6e2835bdeb
commit 311a827ade

View File

@@ -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 // ... and if it fails try to add the template to the database from a data file
smoke_source source; 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... // if deserialization didn't fail finish source setup...
source.m_opacitymodifier.bind( &Global.SmokeFidelity ); source.m_opacitymodifier.bind( &Global.SmokeFidelity );
// ...then cache the source as template for future instances // ...then cache the source as template for future instances