From 49545e6d299a706e6adcce6246b40441aa433c6a Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 14 Mar 2021 13:40:48 +0100 Subject: [PATCH] add comments as to why we need to check that the player is grounded or not; only run once during initial cell loading --- apps/openmw/mwworld/scene.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index ac01c8893..31d83dce3 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -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); }