aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-09-30 15:28:23 -0700
committerJohn Hurliman2009-09-30 15:28:23 -0700
commitacfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009 (patch)
tree305349e1bd0a5849fd7f96483e24d5e07b24b8f4 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
parent* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityB... (diff)
parentFormatting cleanup. (diff)
downloadopensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.zip
opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.gz
opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.bz2
opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
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