From cc903992dd3d74a7ff859f0e1a6363ac0c074520 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 30 May 2012 21:32:15 +0100 Subject: [PATCH] ubitode prim: if makebody() is called already having a body, do a full destrution so there are no 'leaks'. --- OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index ac049b2cdb..9a40ab583d 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs @@ -1621,12 +1621,13 @@ namespace OpenSim.Region.Physics.OdePlugin if (Body != IntPtr.Zero) { - d.BodyDestroy(Body); - Body = IntPtr.Zero; +// d.BodyDestroy(Body); +// Body = IntPtr.Zero; + // do a more complet destruction + DestroyBody(); m_log.Warn("[PHYSICS]: MakeBody called having a body"); } - if (d.GeomGetBody(prim_geom) != IntPtr.Zero) { d.GeomSetBody(prim_geom, IntPtr.Zero);