From 019d057563e741833463cadd2beccdfe79d19ebe Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 20 Nov 2015 19:40:04 +0000 Subject: stop the Vehicle AFTER fixing position not before, bc stop code also updates position (old ode) --- OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index a31110b..ac082cb 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs @@ -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(); -- cgit v1.1