diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9d987962..6381a2a281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -120,6 +120,7 @@ Bug #5099: Non-swimming enemies will enter water if player is water walking Bug #5104: Black Dart's enchantment doesn't trigger at low Enchant levels Bug #5105: NPCs start combat with werewolves from any distance + Bug #5106: Still can jump even when encumbered Bug #5110: ModRegion with a redundant numerical argument breaks script execution Bug #5112: Insufficient magicka for current spell not reflected on HUD icon Bug #5123: Script won't run on respawn diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index 9f3a881930..e2021bea9e 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -2014,7 +2014,8 @@ void CharacterController::update(float duration, bool animationOnly) cls.getCreatureStats(mPtr).setFatigue(fatigue); } - if(sneak || inwater || flying || incapacitated || !solid) + float z = cls.getJump(mPtr); + if(sneak || inwater || flying || incapacitated || !solid || z <= 0) vec.z() = 0.0f; bool inJump = true; @@ -2037,7 +2038,6 @@ void CharacterController::update(float duration, bool animationOnly) else if(vec.z() > 0.0f && mJumpState != JumpState_InAir) { // Started a jump. - float z = cls.getJump(mPtr); if (z > 0) { if(vec.x() == 0 && vec.y() == 0)