diff options
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 0e29ccc..1ea08e2 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -498,12 +498,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
498 | // If this mesh has been created already, return it instead of creating another copy | 498 | // If this mesh has been created already, return it instead of creating another copy |
499 | // For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory | 499 | // For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory |
500 | 500 | ||
501 | if (! primShape.SculptEntry) | 501 | key = GetMeshKey(primShape, size, lod); |
502 | { | 502 | if (m_uniqueMeshes.TryGetValue(key, out mesh)) |
503 | key = GetMeshKey(primShape, size, lod); | 503 | return mesh; |
504 | if (m_uniqueMeshes.TryGetValue(key, out mesh)) | ||
505 | return mesh; | ||
506 | } | ||
507 | 504 | ||
508 | if (size.X < 0.01f) size.X = 0.01f; | 505 | if (size.X < 0.01f) size.X = 0.01f; |
509 | if (size.Y < 0.01f) size.Y = 0.01f; | 506 | if (size.Y < 0.01f) size.Y = 0.01f; |
@@ -525,10 +522,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
525 | 522 | ||
526 | // trim the vertex and triangle lists to free up memory | 523 | // trim the vertex and triangle lists to free up memory |
527 | mesh.TrimExcess(); | 524 | mesh.TrimExcess(); |
528 | } | ||
529 | 525 | ||
530 | if (!primShape.SculptEntry) | ||
531 | m_uniqueMeshes.Add(key, mesh); | 526 | m_uniqueMeshes.Add(key, mesh); |
527 | } | ||
532 | 528 | ||
533 | return mesh; | 529 | return mesh; |
534 | } | 530 | } |