From b8472e13032108b75980b65877380cb214edd772 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Fri, 28 May 2021 16:55:54 +0200 Subject: [PATCH] Use modified paralyze magnitude to fall and float --- apps/openmw/mwmechanics/character.cpp | 2 +- apps/openmw/mwphysics/physicssystem.cpp | 2 +- apps/openmw/mwworld/worldimp.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index f7c50c5b6..54c951187 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -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; } diff --git a/apps/openmw/mwphysics/physicssystem.cpp b/apps/openmw/mwphysics/physicssystem.cpp index 705e15187..833bb9a16 100644 --- a/apps/openmw/mwphysics/physicssystem.cpp +++ b/apps/openmw/mwphysics/physicssystem.cpp @@ -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(); } diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index e406992e2..45a7dd8a7 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -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))