mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Don't set an underwater environment when there's no water
This commit is contained in:
parent
54ce95cfaf
commit
2147210ad7
1 changed files with 2 additions and 2 deletions
|
@ -407,7 +407,7 @@ namespace MWSound
|
|||
if(!isMusicPlaying())
|
||||
startRandomTitle();
|
||||
|
||||
MWWorld::Ptr::CellStore *current = mEnvironment.mWorld->getPlayer().getPlayer().getCell();
|
||||
const ESM::Cell *cell = mEnvironment.mWorld->getPlayer().getPlayer().getCell()->cell;
|
||||
Ogre::Camera *cam = mEnvironment.mWorld->getPlayer().getRenderer()->getCamera();
|
||||
Ogre::Vector3 nPos, nDir, nUp;
|
||||
nPos = cam->getRealPosition();
|
||||
|
@ -415,7 +415,7 @@ namespace MWSound
|
|||
nUp = cam->getRealUp();
|
||||
|
||||
Environment env = Env_Normal;
|
||||
if(nPos.y < current->cell->water)
|
||||
if((cell->data.flags&cell->HasWater) && nPos.y < cell->water)
|
||||
env = Env_Underwater;
|
||||
|
||||
// The output handler is expecting vectors oriented like the game
|
||||
|
|
Loading…
Reference in a new issue