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:
parent
3572edab72
commit
13e94ab194
2 changed files with 8 additions and 0 deletions
|
@ -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…
Reference in a new issue