diff --git a/src/graphics/draw_calls.cpp b/src/graphics/draw_calls.cpp index c8acf2f2e53..3df22699743 100644 --- a/src/graphics/draw_calls.cpp +++ b/src/graphics/draw_calls.cpp @@ -151,6 +151,7 @@ void DrawCalls::parseSceneManager(core::array &List, if (List[i]->getType() == ESNT_LOD_NODE) { LODNode *node = static_cast(List[i]); + node->updateVisibility(); core::array child; if (node->getLevel() >= 0) diff --git a/src/graphics/lod_node.cpp b/src/graphics/lod_node.cpp index 997faa0fc47..60a26ca3be7 100644 --- a/src/graphics/lod_node.cpp +++ b/src/graphics/lod_node.cpp @@ -110,32 +110,15 @@ void LODNode::forceLevelOfDetail(int n) // ---------------------------------------------------------------------------- void LODNode::OnAnimate(u32 timeMs) { - updateVisibility(); - if (isVisible() && m_nodes.size() > 0) { // update absolute position updateAbsolutePosition(); -#ifndef SERVER_ONLY - if (CVS->isGLSL()) - { - for (size_t i = 0; i < m_nodes.size(); i++) - { - m_nodes[i]->setVisible(true); - m_nodes[i]->OnAnimate(timeMs); - } - } - else -#endif + for (size_t i = 0; i < m_nodes.size(); i++) { - int level = getLevel(); - // Assume all the scene node have the same bouding box - if(level >= 0) - { - m_nodes[level]->setVisible(true); - m_nodes[level]->OnAnimate(timeMs); - } + m_nodes[i]->setVisible(true); + m_nodes[i]->OnAnimate(timeMs); } if (m_update_box_every_frame) @@ -173,6 +156,8 @@ void LODNode::updateVisibility() void LODNode::OnRegisterSceneNode() { + updateVisibility(); + #ifndef SERVER_ONLY if (CVS->isGLSL()) {