mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 22:09:39 +00:00
Merge pull request #2115 from Capostrophic/slowfall
Don't reset player jumping flag unnecessarily (bug #4775)
This commit is contained in:
commit
de24682e2f
2 changed files with 5 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
Bug #4746: Non-solid player can't run or sneak
|
Bug #4746: Non-solid player can't run or sneak
|
||||||
Bug #4750: Sneaking doesn't work in first person view if the player is in attack ready state
|
Bug #4750: Sneaking doesn't work in first person view if the player is in attack ready state
|
||||||
Bug #4768: Fallback numerical value recovery chokes on invalid arguments
|
Bug #4768: Fallback numerical value recovery chokes on invalid arguments
|
||||||
|
Bug #4775: Slowfall effect resets player jumping flag
|
||||||
Bug #4778: Interiors of Illusion puzzle in Sotha Sil Expanded mod is broken
|
Bug #4778: Interiors of Illusion puzzle in Sotha Sil Expanded mod is broken
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
Feature #3442: Default values for fallbacks from ini file
|
Feature #3442: Default values for fallbacks from ini file
|
||||||
|
|
|
@ -1317,6 +1317,7 @@ namespace MWPhysics
|
||||||
float slowFall = 1.f - std::max(0.f, std::min(1.f, effects.get(ESM::MagicEffect::SlowFall).getMagnitude() * 0.005f));
|
float slowFall = 1.f - std::max(0.f, std::min(1.f, effects.get(ESM::MagicEffect::SlowFall).getMagnitude() * 0.005f));
|
||||||
|
|
||||||
bool flying = world->isFlying(iter->first);
|
bool flying = world->isFlying(iter->first);
|
||||||
|
bool swimming = world->isSwimming(iter->first);
|
||||||
|
|
||||||
bool wasOnGround = physicActor->getOnGround();
|
bool wasOnGround = physicActor->getOnGround();
|
||||||
osg::Vec3f position = physicActor->getPosition();
|
osg::Vec3f position = physicActor->getPosition();
|
||||||
|
@ -1339,8 +1340,9 @@ namespace MWPhysics
|
||||||
float heightDiff = position.z() - oldHeight;
|
float heightDiff = position.z() - oldHeight;
|
||||||
|
|
||||||
MWMechanics::CreatureStats& stats = iter->first.getClass().getCreatureStats(iter->first);
|
MWMechanics::CreatureStats& stats = iter->first.getClass().getCreatureStats(iter->first);
|
||||||
if ((numSteps > 0 && wasOnGround && physicActor->getOnGround()) || flying || world->isSwimming(iter->first) || slowFall < 1)
|
bool isStillOnGround = (numSteps > 0 && wasOnGround && physicActor->getOnGround());
|
||||||
stats.land(iter->first == player);
|
if (isStillOnGround || flying || swimming || slowFall < 1)
|
||||||
|
stats.land(iter->first == player && (flying || swimming));
|
||||||
else if (heightDiff < 0)
|
else if (heightDiff < 0)
|
||||||
stats.addToFallHeight(-heightDiff);
|
stats.addToFallHeight(-heightDiff);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue