1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 15:15:31 +00:00

Get navmesh to update osg node only if rendering is enabled

This commit is contained in:
elsid 2019-01-20 19:30:26 +03:00
parent 3572edab72
commit 13e94ab194
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
2 changed files with 8 additions and 0 deletions

View file

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

View file

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