UbitODE: leave avatar 'freemove' state (entered on setmomentum) on any significant change like new 'velocity' or new position, etc, requests

avinationmerge
UbitUmarov 2012-05-04 22:24:04 +01:00
parent 197163e12a
commit 6b3135aa4d
1 changed files with 4 additions and 2 deletions

View File

@ -1184,7 +1184,7 @@ namespace OpenSim.Region.Physics.OdePlugin
// destroy avatar capsule and related ODE data // destroy avatar capsule and related ODE data
AvatarGeomAndBodyDestroy(); AvatarGeomAndBodyDestroy();
} }
m_freemove = false;
m_isPhysical = NewStatus; m_isPhysical = NewStatus;
} }
} }
@ -1236,7 +1236,7 @@ namespace OpenSim.Region.Physics.OdePlugin
+ (Amotor == IntPtr.Zero ? "Amotor " : "")); + (Amotor == IntPtr.Zero ? "Amotor " : ""));
} }
} }
m_freemove = false;
m_pidControllerActive = true; m_pidControllerActive = true;
} }
else else
@ -1250,6 +1250,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (Body != IntPtr.Zero) if (Body != IntPtr.Zero)
d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z); d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z);
_position = newPos; _position = newPos;
m_freemove = false;
m_pidControllerActive = true; m_pidControllerActive = true;
} }
@ -1260,6 +1261,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private void changeVelocity(Vector3 newVel) private void changeVelocity(Vector3 newVel)
{ {
m_pidControllerActive = true; m_pidControllerActive = true;
m_freemove = false;
_target_velocity = newVel; _target_velocity = newVel;
} }