forked from mirror/openmw-tes3mp
Float to surface fix
This commit is contained in:
parent
b5cb11ff07
commit
693d3cea4a
2 changed files with 3 additions and 3 deletions
|
@ -1938,7 +1938,7 @@ void CharacterController::update(float duration)
|
|||
if (mSkipAnim)
|
||||
mAnimation->updateEffects(duration);
|
||||
|
||||
if (mFloatToSurface && cls.isActor() && cls.getCreatureStats(mPtr).isDead())
|
||||
if (mFloatToSurface && cls.isActor() && cls.getCreatureStats(mPtr).isDead() && cls.canSwim(mPtr))
|
||||
moved.z() = 1.0;
|
||||
|
||||
// Update movement
|
||||
|
|
|
@ -280,9 +280,9 @@ namespace MWPhysics
|
|||
{
|
||||
velocity = (osg::Quat(refpos.rot[2], osg::Vec3f(0, 0, -1))) * movement;
|
||||
|
||||
if (velocity.z() > 0.f)
|
||||
if (velocity.z() > 0.f && physicActor->getOnGround())
|
||||
inertia = velocity;
|
||||
if(!physicActor->getOnGround())
|
||||
else if(!physicActor->getOnGround())
|
||||
{
|
||||
velocity = velocity + physicActor->getInertialForce();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue