1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 20:53:52 +00:00

Merge branch 'fix_falling' into 'master'

Resolve #5895 by checking that the player is not on the ground

Closes #5895

See merge request OpenMW/openmw!651
This commit is contained in:
psi29a 2021-03-14 21:57:35 +00:00
commit 9d5ec7624e

View file

@ -447,11 +447,17 @@ namespace MWWorld
mPhysics->disableWater();
const auto player = MWBase::Environment::get().getWorld()->getPlayerPtr();
// By default the player is grounded, with the scene fully loaded, we validate and correct this.
if (player.mCell == cell) // Only run once, during initial cell load.
{
mPhysics->traceDown(player, player.getRefData().getPosition().asVec3(), 10.f);
}
navigator->update(player.getRefData().getPosition().asVec3());
if (!cell->isExterior() && !(cell->getCell()->mData.mFlags & ESM::Cell::QuasiEx))
{
mRendering.configureAmbient(cell->getCell());
}
}