Use modified paralyze magnitude to fall and float

pull/593/head
Evil Eye 4 years ago
parent 9dfba37ce9
commit b8472e1303

@ -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;
}

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

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

Loading…
Cancel
Save