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:
commit
9d5ec7624e
1 changed files with 7 additions and 1 deletions
|
@ -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…
Reference in a new issue