From e55e93c994befde561c467b40768a21dcf72892e Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Mon, 4 Oct 2010 07:37:22 +0200 Subject: [PATCH] Avoid throwing errors when adding existing meshes to the render scene --- .../Region/CoreModules/World/Warp3DMap/MapImageModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs index a99b20c91d..49b4364e14 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs @@ -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++)