forked from teamnwah/openmw-tes3coop
fix underwater effect staying active when teleporting from underwater to a cell that doesn't have water
This commit is contained in:
parent
c6da3872b4
commit
7400b7f313
2 changed files with 8 additions and 1 deletions
|
@ -512,11 +512,13 @@ Shadows* RenderingManager::getShadows()
|
|||
void RenderingManager::switchToInterior()
|
||||
{
|
||||
mObjects.setInterior(true);
|
||||
mRendering.getScene()->setCameraRelativeRendering(false);
|
||||
}
|
||||
|
||||
void RenderingManager::switchToExterior()
|
||||
{
|
||||
mObjects.setInterior(false);
|
||||
mRendering.getScene()->setCameraRelativeRendering(true);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -176,7 +176,12 @@ void Water::toggle()
|
|||
|
||||
void Water::checkUnderwater(float y)
|
||||
{
|
||||
if (!mActive) return;
|
||||
if (!mActive)
|
||||
{
|
||||
CompositorManager::getSingleton().setCompositorEnabled(mViewport, mCompositorName, false);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((mIsUnderwater && y > mTop) || !mWater->isVisible() || mCamera->getPolygonMode() != Ogre::PM_SOLID)
|
||||
{
|
||||
CompositorManager::getSingleton().setCompositorEnabled(mViewport, mCompositorName, false);
|
||||
|
|
Loading…
Reference in a new issue