mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-31 00:15:35 +00:00
Disallow resting if the fall height hasn't been reset (bug #4802)
This commit is contained in:
parent
0a32850441
commit
483b37bb3f
4 changed files with 10 additions and 1 deletions
|
@ -63,6 +63,7 @@
|
||||||
Bug #4787: Sneaking makes 1st person walking/bobbing animation super-slow
|
Bug #4787: Sneaking makes 1st person walking/bobbing animation super-slow
|
||||||
Bug #4797: Player sneaking and running stances are not accounted for when in air
|
Bug #4797: Player sneaking and running stances are not accounted for when in air
|
||||||
Bug #4800: Standing collisions are not updated immediately when an object is teleported without a cell change
|
Bug #4800: Standing collisions are not updated immediately when an object is teleported without a cell change
|
||||||
|
Bug #4802: You can rest before taking falling damage from landing from a jump
|
||||||
Bug #4803: Stray special characters before begin statement break script compilation
|
Bug #4803: Stray special characters before begin statement break script compilation
|
||||||
Bug #4804: Particle system with the "Has Sizes = false" causes an exception
|
Bug #4804: Particle system with the "Has Sizes = false" causes an exception
|
||||||
Bug #4805: NPC movement speed calculations do not take race Weight into account
|
Bug #4805: NPC movement speed calculations do not take race Weight into account
|
||||||
|
|
|
@ -426,6 +426,11 @@ namespace MWMechanics
|
||||||
mFallHeight += height;
|
mFallHeight += height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float CreatureStats::getFallHeight() const
|
||||||
|
{
|
||||||
|
return mFallHeight;
|
||||||
|
}
|
||||||
|
|
||||||
float CreatureStats::land(bool isPlayer)
|
float CreatureStats::land(bool isPlayer)
|
||||||
{
|
{
|
||||||
if (isPlayer)
|
if (isPlayer)
|
||||||
|
|
|
@ -115,6 +115,7 @@ namespace MWMechanics
|
||||||
bool needToRecalcDynamicStats();
|
bool needToRecalcDynamicStats();
|
||||||
void setNeedRecalcDynamicStats(bool val);
|
void setNeedRecalcDynamicStats(bool val);
|
||||||
|
|
||||||
|
float getFallHeight() const;
|
||||||
void addToFallHeight(float height);
|
void addToFallHeight(float height);
|
||||||
|
|
||||||
/// Reset the fall height
|
/// Reset the fall height
|
||||||
|
|
|
@ -2513,7 +2513,9 @@ namespace MWWorld
|
||||||
if (isUnderwater(currentCell, playerPos) || isWalkingOnWater(player))
|
if (isUnderwater(currentCell, playerPos) || isWalkingOnWater(player))
|
||||||
return Rest_PlayerIsUnderwater;
|
return Rest_PlayerIsUnderwater;
|
||||||
|
|
||||||
if ((actor->getCollisionMode() && !mPhysics->isOnSolidGround(player)) || isFlying(player))
|
float fallHeight = player.getClass().getCreatureStats(player).getFallHeight();
|
||||||
|
float epsilon = 1e-4;
|
||||||
|
if ((actor->getCollisionMode() && (!mPhysics->isOnSolidGround(player) || fallHeight >= epsilon)) || isFlying(player))
|
||||||
return Rest_PlayerIsInAir;
|
return Rest_PlayerIsInAir;
|
||||||
|
|
||||||
if((currentCell->getCell()->mData.mFlags&ESM::Cell::NoSleep) || player.getClass().getNpcStats(player).isWerewolf())
|
if((currentCell->getCell()->mData.mFlags&ESM::Cell::NoSleep) || player.getClass().getNpcStats(player).isWerewolf())
|
||||||
|
|
Loading…
Reference in a new issue