mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Float to surface fix
This commit is contained in:
parent
b5cb11ff07
commit
693d3cea4a
@ -1938,7 +1938,7 @@ void CharacterController::update(float duration)
|
|||||||
if (mSkipAnim)
|
if (mSkipAnim)
|
||||||
mAnimation->updateEffects(duration);
|
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;
|
moved.z() = 1.0;
|
||||||
|
|
||||||
// Update movement
|
// Update movement
|
||||||
|
@ -280,9 +280,9 @@ namespace MWPhysics
|
|||||||
{
|
{
|
||||||
velocity = (osg::Quat(refpos.rot[2], osg::Vec3f(0, 0, -1))) * movement;
|
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;
|
inertia = velocity;
|
||||||
if(!physicActor->getOnGround())
|
else if(!physicActor->getOnGround())
|
||||||
{
|
{
|
||||||
velocity = velocity + physicActor->getInertialForce();
|
velocity = velocity + physicActor->getInertialForce();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user