1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 02:39:43 +00:00

Use modified paralyze magnitude to fall and float

This commit is contained in:
Evil Eye 2021-05-28 16:55:54 +02:00
parent 9dfba37ce9
commit b8472e1303
3 changed files with 3 additions and 3 deletions

View file

@ -2458,7 +2458,7 @@ void CharacterController::update(float duration)
if (mFloatToSurface && cls.isActor())
{
if (cls.getCreatureStats(mPtr).isDead()
|| (!godmode && cls.getCreatureStats(mPtr).isParalyzed()))
|| (!godmode && cls.getCreatureStats(mPtr).getMagicEffects().get(ESM::MagicEffect::Paralyze).getModifier() > 0))
{
moved.z() = 1.0;
}

View file

@ -932,7 +932,7 @@ namespace MWPhysics
mWantJump = ptr.getClass().getMovementSettings(ptr).mPosition[2] != 0;
auto& stats = ptr.getClass().getCreatureStats(ptr);
const bool godmode = ptr == world->getPlayerConstPtr() && world->getGodModeState();
mFloatToSurface = stats.isDead() || (!godmode && stats.isParalyzed());
mFloatToSurface = stats.isDead() || (!godmode && stats.getMagicEffects().get(ESM::MagicEffect::Paralyze).getModifier() > 0);
mWasOnGround = actor->getOnGround();
}

View file

@ -2323,7 +2323,7 @@ namespace MWWorld
return false;
const bool isPlayer = ptr == getPlayerConstPtr();
if (!(isPlayer && mGodMode) && stats.isParalyzed())
if (!(isPlayer && mGodMode) && stats.getMagicEffects().get(ESM::MagicEffect::Paralyze).getModifier() > 0)
return false;
if (ptr.getClass().canFly(ptr))