From 395d160c414ad4a99ec875718dad72a1dd8c55e2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 20 Nov 2015 19:11:26 +0000 Subject: stop a Vehicle on a failed region cross (or empty border) (old ode) --- OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs') diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs index 82b0999..a31110b 100644 --- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs +++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs @@ -2676,10 +2676,16 @@ 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(); } outofBounds = false; -- cgit v1.1