mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-21 06:14:05 +00:00
add comments as to why we need to check that the player is grounded or not; only run once during initial cell loading
This commit is contained in:
parent
fff1df9ee4
commit
49545e6d29
1 changed files with 3 additions and 1 deletions
|
@ -447,7 +447,9 @@ namespace MWWorld
|
||||||
mPhysics->disableWater();
|
mPhysics->disableWater();
|
||||||
|
|
||||||
const auto player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
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);
|
mPhysics->traceDown(player, player.getRefData().getPosition().asVec3(), 10.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue