diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 9cfc7ed101..c6ccc9e5eb 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs @@ -880,6 +880,11 @@ namespace OpenSim.Framework } public ulong GetMeshKey(Vector3 size, float lod) + { + return GetMeshKey(size, lod, false); + } + + public ulong GetMeshKey(Vector3 size, float lod, bool convex) { ulong hash = 5381; @@ -926,6 +931,9 @@ namespace OpenSim.Framework hash = djb2(hash, scaleBytes[i]); } + if(convex) + hash = djb2(hash, 0xa5); + return hash; } diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs index 7667e91f62..df083811be 100644 --- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs @@ -995,7 +995,7 @@ namespace OpenSim.Region.Physics.Meshing // If this mesh has been created already, return it instead of creating another copy // For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory - key = primShape.GetMeshKey(size, lod); + key = primShape.GetMeshKey(size, lod, convex); if (m_uniqueMeshes.TryGetValue(key, out mesh)) return mesh;