aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs11
2 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index a01cf1e..6103320 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Physics.OdePlugin
92 public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size, 92 public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size,
93 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical) 93 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical)
94 { 94 {
95 System.Threading.Thread.Sleep(20); 95
96 _velocity = new PhysicsVector(); 96 _velocity = new PhysicsVector();
97 _position = pos; 97 _position = pos;
98 m_taintposition = pos; 98 m_taintposition = pos;
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index a2f354a..1c16cfb 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -730,7 +730,16 @@ namespace OpenSim.Region.Physics.OdePlugin
730 } 730 }
731 } 731 }
732 } 732 }
733 try
734 {
733 735
736 d.GeomDestroy(prim.prim_geom);
737 }
738 catch (System.AccessViolationException)
739 {
740 m_log.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed.");
741 }
742 _prims.Remove(prim);
734 743
735 //If there are no more geometries in the sub-space, we don't need it in the main space anymore 744 //If there are no more geometries in the sub-space, we don't need it in the main space anymore
736 if (d.SpaceGetNumGeoms(prim.m_targetSpace) == 0) 745 if (d.SpaceGetNumGeoms(prim.m_targetSpace) == 0)
@@ -755,9 +764,7 @@ namespace OpenSim.Region.Physics.OdePlugin
755 } 764 }
756 } 765 }
757 766
758 d.GeomDestroy(prim.prim_geom);
759 767
760 _prims.Remove(prim);
761 } 768 }
762 } 769 }
763 /// <summary> 770 /// <summary>