Avoid throwing errors when adding existing meshes to the render scene

viewer-2-initial-appearance
Latif Khalifa 2010-10-04 07:37:22 +02:00 committed by Melanie
parent 0e7e92b67f
commit cb6e4035c7
1 changed files with 6 additions and 0 deletions

View File

@ -352,6 +352,12 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
Face face = renderMesh.Faces[i];
string meshName = primID + "-Face-" + i.ToString();
// Avoid adding duplicate meshes to the scene
if (renderer.Scene.objectData.ContainsKey(meshName))
{
continue;
}
warp_Object faceObj = new warp_Object(face.Vertices.Count, face.Indices.Count / 3);
for (int j = 0; j < face.Vertices.Count; j++)