From 1b56fff7c8ca3a3e14e576ecb0137d9d34997205 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Thu, 9 Apr 2009 10:07:40 +0000
Subject: * Implements retrieving child primitives via World.Objects[id] (MRM)
* Optimizes SceneGraph - fetches on primitives via "GetGroupByPrim" wont
search the entire list if the primitive is infact the root. (Core) * Updates
Test MRM.
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 3 +++
1 file changed, 3 insertions(+)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index d6aca31..c2f9fd2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -860,6 +860,9 @@ namespace OpenSim.Region.Framework.Scenes
/// null if no scene object group containing that prim is found
private SceneObjectGroup GetGroupByPrim(uint localID)
{
+ if (Entities.ContainsKey(localID))
+ return Entities[localID] as SceneObjectGroup;
+
//m_log.DebugFormat("Entered GetGroupByPrim with localID {0}", localID);
List EntityList = GetEntities();
foreach (EntityBase ent in EntityList)
--
cgit v1.1