1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Merge branch 'waterculling' into 'master'

Don't use height cull callback when there's no terrain

See merge request OpenMW/openmw!3787
This commit is contained in:
psi29a 2024-01-20 15:52:59 +00:00
commit f7c819a118

View File

@ -145,7 +145,7 @@ namespace Terrain
osg::Callback* World::getHeightCullCallback(float highz, unsigned int mask)
{
if (!mHeightCullCallback)
if (!mHeightCullCallback || mTerrainRoot->getNumChildren() == 0)
return nullptr;
mHeightCullCallback->setHighZ(highz);