aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 5109a6a..9a40ab5 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -1621,12 +1621,13 @@ namespace OpenSim.Region.Physics.OdePlugin
1621 1621
1622 if (Body != IntPtr.Zero) 1622 if (Body != IntPtr.Zero)
1623 { 1623 {
1624 d.BodyDestroy(Body); 1624// d.BodyDestroy(Body);
1625 Body = IntPtr.Zero; 1625// Body = IntPtr.Zero;
1626 // do a more complet destruction
1627 DestroyBody();
1626 m_log.Warn("[PHYSICS]: MakeBody called having a body"); 1628 m_log.Warn("[PHYSICS]: MakeBody called having a body");
1627 } 1629 }
1628 1630
1629
1630 if (d.GeomGetBody(prim_geom) != IntPtr.Zero) 1631 if (d.GeomGetBody(prim_geom) != IntPtr.Zero)
1631 { 1632 {
1632 d.GeomSetBody(prim_geom, IntPtr.Zero); 1633 d.GeomSetBody(prim_geom, IntPtr.Zero);
@@ -3320,6 +3321,10 @@ namespace OpenSim.Region.Physics.OdePlugin
3320 3321
3321 protected void changeBuilding(bool newbuilding) 3322 protected void changeBuilding(bool newbuilding)
3322 { 3323 {
3324 // Check if we need to do anything
3325 if (newbuilding == m_building)
3326 return;
3327
3323 if ((bool)newbuilding) 3328 if ((bool)newbuilding)
3324 { 3329 {
3325 m_building = true; 3330 m_building = true;
@@ -4066,4 +4071,4 @@ namespace OpenSim.Region.Physics.OdePlugin
4066 public Vector3 value; 4071 public Vector3 value;
4067 } 4072 }
4068 } 4073 }
4069} \ No newline at end of file 4074}