ubitode prim: if makebody() is called already having a body, do a full destrution so there are no 'leaks'.

avinationmerge
UbitUmarov 2012-05-30 21:32:15 +01:00
parent c548f48791
commit cc903992dd
1 changed files with 4 additions and 3 deletions

View File

@ -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);