Get navmesh to update osg node only if rendering is enabled

pull/541/head
elsid 6 years ago
parent 3572edab72
commit 13e94ab194
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -30,6 +30,11 @@ namespace MWRender
void disable();
bool isEnabled() const
{
return mEnabled;
}
private:
osg::ref_ptr<osg::Group> mRootNode;
bool mEnabled;

@ -1385,6 +1385,9 @@ namespace MWRender
void RenderingManager::updateNavMesh()
{
if (!mNavMesh->isEnabled())
return;
const auto navMeshes = mNavigator.getNavMeshes();
auto it = navMeshes.begin();

Loading…
Cancel
Save