1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-13 11:39:47 +00:00

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.
This commit is contained in:
Emanuel Guevel 2013-10-02 22:54:36 +02:00
parent 4265dddc40
commit 2abe5c1c9a
2 changed files with 11 additions and 1 deletions
apps/openmw/mwmechanics

View file

@ -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>();

View file

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