mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 22:39:41 +00:00
Use modified paralyze magnitude to fall and float
This commit is contained in:
parent
9dfba37ce9
commit
b8472e1303
3 changed files with 3 additions and 3 deletions
|
@ -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…
Reference in a new issue