Merge pull request #2085 from akortunov/herbalism

Native graphics herbalism support
This commit is contained in:
Alexei Dobrohotov 2019-05-03 20:58:22 +03:00 committed by GitHub
commit 74112976b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 232 additions and 4 deletions

View file

@ -27,6 +27,9 @@ const int CellSizeInUnits = 8192;
// A label to mark night/day visual switches
const std::string NightDayLabel = "NightDaySwitch";
// A label to mark visual switches for herbalism feature
const std::string HerbalismLabel = "HerbalismSwitch";
}
#endif

View file

@ -635,6 +635,8 @@ namespace NifOsg
const Nif::NiSwitchNode* niSwitchNode = static_cast<const Nif::NiSwitchNode*>(nifNode);
if (niSwitchNode->name == Constants::NightDayLabel && !SceneUtil::hasUserDescription(rootNode, Constants::NightDayLabel))
rootNode->getOrCreateUserDataContainer()->addDescription(Constants::NightDayLabel);
else if (niSwitchNode->name == Constants::HerbalismLabel && !SceneUtil::hasUserDescription(rootNode, Constants::HerbalismLabel))
rootNode->getOrCreateUserDataContainer()->addDescription(Constants::HerbalismLabel);
}
return node;