mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
Fix setWaterLevel script instruction not affecting physics
This commit is contained in:
parent
01e32aef79
commit
ad8790fba0
2 changed files with 6 additions and 6 deletions
|
@ -723,9 +723,9 @@ namespace MWSound
|
|||
|
||||
MWWorld::Ptr player =
|
||||
MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
const ESM::Cell *cell = player.getCell()->getCell();
|
||||
const MWWorld::CellStore *cell = player.getCell();
|
||||
|
||||
mListenerUnderwater = ((cell->mData.mFlags&cell->HasWater) && mListenerPos.z < cell->mWater);
|
||||
mListenerUnderwater = ((cell->getCell()->mData.mFlags&ESM::Cell::HasWater) && mListenerPos.z < cell->getWaterLevel());
|
||||
}
|
||||
|
||||
void SoundManager::updatePtr(const MWWorld::Ptr &old, const MWWorld::Ptr &updated)
|
||||
|
|
|
@ -862,9 +862,9 @@ namespace MWWorld
|
|||
for(;iter != mMovementQueue.end();++iter)
|
||||
{
|
||||
float waterlevel = -std::numeric_limits<float>::max();
|
||||
const ESM::Cell *cell = iter->first.getCell()->getCell();
|
||||
if(cell->hasWater())
|
||||
waterlevel = cell->mWater;
|
||||
const MWWorld::CellStore *cell = iter->first.getCell();
|
||||
if(cell->getCell()->hasWater())
|
||||
waterlevel = cell->getWaterLevel();
|
||||
|
||||
float oldHeight = iter->first.getRefData().getPosition().pos[2];
|
||||
|
||||
|
@ -872,7 +872,7 @@ namespace MWWorld
|
|||
|
||||
bool waterCollision = false;
|
||||
if (effects.get(ESM::MagicEffect::WaterWalking).getMagnitude()
|
||||
&& cell->hasWater()
|
||||
&& cell->getCell()->hasWater()
|
||||
&& !world->isUnderwater(iter->first.getCell(),
|
||||
Ogre::Vector3(iter->first.getRefData().getPosition().pos)))
|
||||
waterCollision = true;
|
||||
|
|
Loading…
Reference in a new issue