mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
fixed underwater wireframe mode
This commit is contained in:
parent
6022d3ab13
commit
b380e71832
@ -31,11 +31,8 @@
|
|||||||
|
|
||||||
namespace Ogre
|
namespace Ogre
|
||||||
{
|
{
|
||||||
class Camera;
|
|
||||||
class Viewport;
|
|
||||||
class SceneManager;
|
class SceneManager;
|
||||||
class SceneNode;
|
class SceneNode;
|
||||||
class RaySceneQuery;
|
|
||||||
class Quaternion;
|
class Quaternion;
|
||||||
class Vector3;
|
class Vector3;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ void Water::toggle()
|
|||||||
|
|
||||||
void Water::checkUnderwater(float y)
|
void Water::checkUnderwater(float y)
|
||||||
{
|
{
|
||||||
if ((mIsUnderwater && y > mTop) || !mWater->isVisible())
|
if ((mIsUnderwater && y > mTop) || !mWater->isVisible() || mCamera->getPolygonMode() != Ogre::PM_SOLID)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Ogre::CompositorManager::getSingleton().setCompositorEnabled(mViewport, "Water", false);
|
Ogre::CompositorManager::getSingleton().setCompositorEnabled(mViewport, "Water", false);
|
||||||
@ -78,7 +78,7 @@ void Water::checkUnderwater(float y)
|
|||||||
mIsUnderwater = false;
|
mIsUnderwater = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mIsUnderwater && y < mTop && mWater->isVisible())
|
if (!mIsUnderwater && y < mTop && mWater->isVisible() && mCamera->getPolygonMode() == Ogre::PM_SOLID)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Ogre::CompositorManager::getSingleton().setCompositorEnabled(mViewport, "Water", true);
|
Ogre::CompositorManager::getSingleton().setCompositorEnabled(mViewport, "Water", true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user