Acrobatics: do not apply fall damages when slowfalling spell effect is active

If spell effect ends up in mid-air, calculate fall height from then.
actorid
Emanuel Guevel 11 years ago
parent 4265dddc40
commit 2abe5c1c9a

@ -776,7 +776,15 @@ void CharacterController::update(float duration)
{
// The player is in the air (either getting up —ascending part of jump— or falling).
mFallHeight = std::max(mFallHeight, mPtr.getRefData().getPosition().pos[2]);
if (world->isSlowFalling(mPtr))
{
// SlowFalling spell effect is active, do not keep previous fall height
mFallHeight = mPtr.getRefData().getPosition().pos[2];
}
else
{
mFallHeight = std::max(mFallHeight, mPtr.getRefData().getPosition().pos[2]);
}
const MWWorld::Store<ESM::GameSetting> &gmst = world->getStore().get<ESM::GameSetting>();

@ -3,6 +3,8 @@
#include <OgreVector3.h>
#include <components/esm/loadmgef.hpp>
#include "../mwworld/ptr.hpp"
namespace MWWorld

Loading…
Cancel
Save