1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00

Merge branch 'another_fix' into 'master'

Fix #6219

Closes #6219

See merge request OpenMW/openmw!1137
This commit is contained in:
Alexei Dobrohotov 2021-08-16 01:15:52 +00:00
commit 7665ebfa67
2 changed files with 6 additions and 3 deletions

View File

@ -710,9 +710,6 @@ namespace MWPhysics
auto actor = std::make_shared<Actor>(ptr, shape, mTaskScheduler.get(), canWaterWalk);
// check if Actor is on the ground or in the air
traceDown(ptr, ptr.getRefData().getPosition().asVec3(), 10.f);
mActors.emplace(ptr, std::move(actor));
}

View File

@ -502,6 +502,12 @@ namespace MWWorld
const auto player = MWBase::Environment::get().getWorld()->getPlayerPtr();
// The player is loaded before the scene and by default it 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);
}
mNavigator.update(player.getRefData().getPosition().asVec3());
if (!cell->isExterior() && !(cell->getCell()->mData.mFlags & ESM::Cell::QuasiEx))