replace util.clip by utils.clamp (from libomv), and a few more cosmetics

This commit is contained in:
UbitUmarov
2022-03-18 02:20:40 +00:00
parent 811b2de565
commit 846d2df245
12 changed files with 63 additions and 62 deletions

View File

@@ -1159,9 +1159,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
m_bodydisablecontrol = 0;
SafeNativeMethods.Vector3 dtmp = SafeNativeMethods.BodyGetPosition(Body);
Vector3 localpos = new Vector3(dtmp.X,dtmp.Y,dtmp.Z);
// the Amotor still lets avatar rotation to drift during colisions
// so force it back to identity
@@ -1172,10 +1169,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde
qtmp.Z = m_orientation2D.Z;
SafeNativeMethods.BodySetQuaternion(Body,ref qtmp);
if(m_pidControllerActive == false)
{
_zeroPosition = localpos;
}
SafeNativeMethods.Vector3 dtmp = SafeNativeMethods.BodyGetPosition(Body);
Vector3 localpos = new Vector3(dtmp.X, dtmp.Y, dtmp.Z);
// check outbounds forcing to be in world
bool fixbody = false;
@@ -1220,6 +1215,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
localpos.Z = 128f;
}
if (m_pidControllerActive == false)
{
_zeroPosition = localpos;
}
if (fixbody)
{
m_freemove = false;