mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 13:36:44 +00:00
the old switch-a-roo because we shoudl only StopTraversal when the node size is larger than 1 and not the other way around
This commit is contained in:
parent
471454adcf
commit
436c640da2
1 changed files with 4 additions and 2 deletions
|
@ -65,8 +65,7 @@ public:
|
|||
{
|
||||
const osg::Vec2f& center = node->getCenter();
|
||||
bool activeGrid = (center.x() > mActiveGrid.x() && center.y() > mActiveGrid.y() && center.x() < mActiveGrid.z() && center.y() < mActiveGrid.w());
|
||||
if (dist > mViewDistance && !activeGrid) // for Scene<->ObjectPaging sync the activegrid must remain loaded
|
||||
return StopTraversal;
|
||||
|
||||
if (node->getSize()>1)
|
||||
{
|
||||
float halfSize = node->getSize()/2;
|
||||
|
@ -77,6 +76,9 @@ public:
|
|||
return Deeper;
|
||||
}
|
||||
|
||||
if (dist > mViewDistance && !activeGrid) // for Scene<->ObjectPaging sync the activegrid must remain loaded
|
||||
return StopTraversal;
|
||||
|
||||
int nativeLodLevel = Log2(static_cast<unsigned int>(node->getSize()/mMinSize));
|
||||
int lodLevel = Log2(static_cast<unsigned int>(dist/(Constants::CellSizeInUnits*mMinSize*mFactor)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue