mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:53:50 +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 (mFloatToSurface && cls.isActor())
|
||||||
{
|
{
|
||||||
if (cls.getCreatureStats(mPtr).isDead()
|
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;
|
moved.z() = 1.0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -932,7 +932,7 @@ namespace MWPhysics
|
||||||
mWantJump = ptr.getClass().getMovementSettings(ptr).mPosition[2] != 0;
|
mWantJump = ptr.getClass().getMovementSettings(ptr).mPosition[2] != 0;
|
||||||
auto& stats = ptr.getClass().getCreatureStats(ptr);
|
auto& stats = ptr.getClass().getCreatureStats(ptr);
|
||||||
const bool godmode = ptr == world->getPlayerConstPtr() && world->getGodModeState();
|
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();
|
mWasOnGround = actor->getOnGround();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2323,7 +2323,7 @@ namespace MWWorld
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const bool isPlayer = ptr == getPlayerConstPtr();
|
const bool isPlayer = ptr == getPlayerConstPtr();
|
||||||
if (!(isPlayer && mGodMode) && stats.isParalyzed())
|
if (!(isPlayer && mGodMode) && stats.getMagicEffects().get(ESM::MagicEffect::Paralyze).getModifier() > 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (ptr.getClass().canFly(ptr))
|
if (ptr.getClass().canFly(ptr))
|
||||||
|
|
Loading…
Reference in a new issue