From b98f93212bcc918e766ff21d52eb6ba5d15c6757 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 20 Apr 2009 06:56:53 +0000 Subject: [PATCH] * Prevent a vehicle crash --- .../Region/Physics/OdePlugin/ODEVehicleSettings.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs b/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs index 81c41ad1ac..bbd19c8480 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs @@ -248,6 +248,11 @@ namespace OpenSim.Region.Physics.OdePlugin { if (m_body == IntPtr.Zero || m_type == Vehicle.TYPE_NONE) return; + + if (m_aMotor != IntPtr.Zero) + { + + } } @@ -292,6 +297,14 @@ namespace OpenSim.Region.Physics.OdePlugin { if (m_body == IntPtr.Zero || m_type == Vehicle.TYPE_NONE) return; + if (m_aMotor != IntPtr.Zero) + { + d.JointDestroy(m_aMotor); + } + if (m_lMotor1 != IntPtr.Zero) + { + d.JointDestroy(m_lMotor1); + } }