mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
stop the Vehicle AFTER fixing position not before, bc stop code also updates position (old ode)
This commit is contained in:
@@ -2676,18 +2676,17 @@ Console.WriteLine(" JointCreateFixed");
|
||||
|
||||
m_lastVelocity = _velocity;
|
||||
|
||||
|
||||
|
||||
if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
|
||||
m_vehicle.Stop();
|
||||
|
||||
if (Body != IntPtr.Zero)
|
||||
{
|
||||
d.BodySetLinearVel(Body, 0, 0, 0); // stop it
|
||||
d.BodySetPosition(Body, _position.X, _position.Y, _position.Z);
|
||||
enableBodySoft();
|
||||
}
|
||||
|
||||
if(m_vehicle != null && m_vehicle.Type != Vehicle.TYPE_NONE)
|
||||
m_vehicle.Stop(); // this also updates vehicle last position from the body position
|
||||
|
||||
enableBodySoft();
|
||||
|
||||
outofBounds = false;
|
||||
base.RequestPhysicsterseUpdate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user