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:
commit
7665ebfa67
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user