forked from teamnwah/openmw-tes3coop
Yet another terrain fix
This commit is contained in:
parent
8b36de6c67
commit
b0a1e1198a
1 changed files with 2 additions and 3 deletions
|
@ -282,9 +282,6 @@ bool QuadTreeNode::update(const Ogre::Vector3 &cameraPos)
|
||||||
size_t wantedLod = 0;
|
size_t wantedLod = 0;
|
||||||
float cellWorldSize = mTerrain->getStorage()->getCellWorldSize();
|
float cellWorldSize = mTerrain->getStorage()->getCellWorldSize();
|
||||||
|
|
||||||
if (!mTerrain->getDistantLandEnabled() && dist > cellWorldSize)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (dist > cellWorldSize*64)
|
if (dist > cellWorldSize*64)
|
||||||
wantedLod = 6;
|
wantedLod = 6;
|
||||||
else if (dist > cellWorldSize*32)
|
else if (dist > cellWorldSize*32)
|
||||||
|
@ -392,6 +389,8 @@ void QuadTreeNode::load(const LoadResponseData &data)
|
||||||
mChunk = new Chunk(mTerrain->getBufferCache().getUVBuffer(), mBounds, data);
|
mChunk = new Chunk(mTerrain->getBufferCache().getUVBuffer(), mBounds, data);
|
||||||
mChunk->setVisibilityFlags(mTerrain->getVisiblityFlags());
|
mChunk->setVisibilityFlags(mTerrain->getVisiblityFlags());
|
||||||
mChunk->setCastShadows(true);
|
mChunk->setCastShadows(true);
|
||||||
|
if (!mTerrain->getDistantLandEnabled())
|
||||||
|
mChunk->setRenderingDistance(8192);
|
||||||
mSceneNode->attachObject(mChunk);
|
mSceneNode->attachObject(mChunk);
|
||||||
|
|
||||||
mMaterialGenerator->enableShadows(mTerrain->getShadowsEnabled());
|
mMaterialGenerator->enableShadows(mTerrain->getShadowsEnabled());
|
||||||
|
|
Loading…
Reference in a new issue