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
pull/593/head
psi29a 4 years ago
commit 9d5ec7624e

@ -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());
}
}

Loading…
Cancel
Save