mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Dead actors underwater will float to the surface
This commit is contained in:
parent
66925be440
commit
f0a1434578
1 changed files with 5 additions and 0 deletions
|
@ -288,6 +288,11 @@ namespace MWPhysics
|
||||||
velocity = velocity + physicActor->getInertialForce();
|
velocity = velocity + physicActor->getInertialForce();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dead actors underwater will float to the surface
|
||||||
|
if (ptr.getClass().getCreatureStats(ptr).isDead() && position.z() < swimlevel)
|
||||||
|
velocity = osg::Vec3f(0,0,1) * 25;
|
||||||
|
|
||||||
ptr.getClass().getMovementSettings(ptr).mPosition[2] = 0;
|
ptr.getClass().getMovementSettings(ptr).mPosition[2] = 0;
|
||||||
|
|
||||||
// Now that we have the effective movement vector, apply wind forces to it
|
// Now that we have the effective movement vector, apply wind forces to it
|
||||||
|
|
Loading…
Reference in a new issue