aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs17
1 files changed, 3 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 673ae39..032b5df 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -82,7 +82,6 @@ namespace OpenSim.Region.Physics.OdePlugin
82 82
83 // private float m_tensor = 5f; 83 // private float m_tensor = 5f;
84 private int body_autodisable_frames = 20; 84 private int body_autodisable_frames = 20;
85 private IMesh primMesh = null;
86 85
87 86
88 private const CollisionCategories m_default_collisionFlags = (CollisionCategories.Geom 87 private const CollisionCategories m_default_collisionFlags = (CollisionCategories.Geom
@@ -814,14 +813,10 @@ namespace OpenSim.Region.Physics.OdePlugin
814 } 813 }
815 } 814 }
816 815
817 IMesh oldMesh = primMesh; 816 float[] vertexList = mesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory
817 int[] indexList = mesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage
818 818
819 primMesh = mesh; 819 mesh.releaseSourceMeshData(); // free up the original mesh data to save memory
820
821 float[] vertexList = primMesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory
822 int[] indexList = primMesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage
823
824 primMesh.releaseSourceMeshData(); // free up the original mesh data to save memory
825 820
826 int VertexCount = vertexList.GetLength(0)/3; 821 int VertexCount = vertexList.GetLength(0)/3;
827 int IndexCount = indexList.GetLength(0); 822 int IndexCount = indexList.GetLength(0);
@@ -847,12 +842,6 @@ namespace OpenSim.Region.Physics.OdePlugin
847 return; 842 return;
848 } 843 }
849 844
850 if (oldMesh != null)
851 {
852 oldMesh.releasePinned();
853 oldMesh = null;
854 }
855
856 // if (IsPhysical && Body == (IntPtr) 0) 845 // if (IsPhysical && Body == (IntPtr) 0)
857 // { 846 // {
858 // Recreate the body 847 // Recreate the body