mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:23:52 +00:00
Make infinite failsafe logic more forgiving
This commit is contained in:
parent
3ae1a208df
commit
9db0bbf255
1 changed files with 2 additions and 2 deletions
|
@ -498,13 +498,13 @@ namespace MWWorld
|
|||
const auto player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
navigator->update(player.getRefData().getPosition().asVec3());
|
||||
|
||||
const float fallThreshold = 90.f;
|
||||
const float fallThreshold = 256.f;
|
||||
if (mCurrentCell && !mCurrentCell->isExterior() && pos.z() < mLowestPos - fallThreshold)
|
||||
{
|
||||
ESM::Position newPos;
|
||||
std::string cellName = mCurrentCell->getCell()->mName;
|
||||
MWBase::Environment::get().getWorld()->findInteriorPosition(cellName, newPos);
|
||||
if (newPos.pos[2] >= mLowestPos - fallThreshold)
|
||||
if (newPos.pos[2] >= mLowestPos)
|
||||
MWWorld::ActionTeleport(cellName, newPos, false).execute(player);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue