diff options
author | Teravus Ovares | 2009-04-20 06:56:53 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-04-20 06:56:53 +0000 |
commit | b98f93212bcc918e766ff21d52eb6ba5d15c6757 (patch) | |
tree | fa318c6da79639b04db49bf74fe0aa2b2a4c94f5 | |
parent | * Allow passing of material type to physics engine (diff) | |
download | opensim-SC-b98f93212bcc918e766ff21d52eb6ba5d15c6757.zip opensim-SC-b98f93212bcc918e766ff21d52eb6ba5d15c6757.tar.gz opensim-SC-b98f93212bcc918e766ff21d52eb6ba5d15c6757.tar.bz2 opensim-SC-b98f93212bcc918e766ff21d52eb6ba5d15c6757.tar.xz |
* Prevent a vehicle crash
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs b/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs index 81c41ad..bbd19c8 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs | |||
@@ -248,6 +248,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
248 | { | 248 | { |
249 | if (m_body == IntPtr.Zero || m_type == Vehicle.TYPE_NONE) | 249 | if (m_body == IntPtr.Zero || m_type == Vehicle.TYPE_NONE) |
250 | return; | 250 | return; |
251 | |||
252 | if (m_aMotor != IntPtr.Zero) | ||
253 | { | ||
254 | |||
255 | } | ||
251 | 256 | ||
252 | } | 257 | } |
253 | 258 | ||
@@ -292,6 +297,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
292 | { | 297 | { |
293 | if (m_body == IntPtr.Zero || m_type == Vehicle.TYPE_NONE) | 298 | if (m_body == IntPtr.Zero || m_type == Vehicle.TYPE_NONE) |
294 | return; | 299 | return; |
300 | if (m_aMotor != IntPtr.Zero) | ||
301 | { | ||
302 | d.JointDestroy(m_aMotor); | ||
303 | } | ||
304 | if (m_lMotor1 != IntPtr.Zero) | ||
305 | { | ||
306 | d.JointDestroy(m_lMotor1); | ||
307 | } | ||
295 | 308 | ||
296 | } | 309 | } |
297 | 310 | ||