From: Frederic Bouvier Date: Mon, 11 Jun 2012 07:12:47 +0000 (+0200) Subject: Static or shared objects are not light volumes (but can include some) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7e8fb16507072076855b7a9de4eb4a4d80249e78;p=simgear.git Static or shared objects are not light volumes (but can include some) --- diff --git a/simgear/scene/tgdb/ReaderWriterSTG.cxx b/simgear/scene/tgdb/ReaderWriterSTG.cxx index 44a2296f..5b58262b 100644 --- a/simgear/scene/tgdb/ReaderWriterSTG.cxx +++ b/simgear/scene/tgdb/ReaderWriterSTG.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -239,7 +240,10 @@ ReaderWriterSTG::readStgFile(const std::string& absoluteFileName, std::string absName = osgDB::findDataFile(name, opt.get()); proxyNode->setFileName(0, absName); if (SGPath(absName).lower_extension() == "ac") + { + proxyNode->setNodeMask( ~simgear::MODELLIGHT_BIT ); opt->setInstantiateEffects(true); + } else opt->setInstantiateEffects(false); proxyNode->setDatabaseOptions(opt.get()); @@ -261,6 +265,8 @@ ReaderWriterSTG::readStgFile(const std::string& absoluteFileName, else opt->setInstantiateEffects(false); node = osgDB::readRefNodeFile(absName, opt.get()); + if (SGPath(absName).lower_extension() == "ac") + node->setNodeMask( ~simgear::MODELLIGHT_BIT ); if (!node.valid()) { SG_LOG( SG_TERRAIN, SG_ALERT, absoluteFileName