Merge branch 'statuesque' into 'master'

Use modified paralyze magnitude to fall and float

Closes #6063

See merge request OpenMW/openmw!915
pull/593/head
psi29a 4 years ago
commit 7330921bd6

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