add comments as to why we need to check that the player is grounded or not; only run once during initial cell loading

pull/593/head
Bret Curtis 4 years ago
parent fff1df9ee4
commit 49545e6d29

@ -447,7 +447,9 @@ namespace MWWorld
mPhysics->disableWater();
const auto player = MWBase::Environment::get().getWorld()->getPlayerPtr();
if (player.getCell() == cell) {
// By default the player is grounded, with the scene fully loaded, we validate and correct this.
if (player.getCell() == cell) { // Only run once, during initial cell load.
mPhysics->traceDown(player, player.getRefData().getPosition().asVec3(), 10.f);
}

Loading…
Cancel
Save