aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs55
1 files changed, 4 insertions, 51 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 66fb493..5c542d6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -215,27 +215,9 @@ namespace OpenSim.Region.Framework.Scenes
215 if (sp.IsChildAgent) 215 if (sp.IsChildAgent)
216 continue; 216 continue;
217 217
218 if (sp.ParentID != 0) 218 coarseLocations.Add(sp.AbsolutePosition);
219 { 219
220 // sitting avatar 220 avatarUUIDs.Add(sp.UUID);
221 SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID);
222 if (sop != null)
223 {
224 coarseLocations.Add(sop.AbsolutePosition + sp.OffsetPosition);
225 avatarUUIDs.Add(sp.UUID);
226 }
227 else
228 {
229 // we can't find the parent.. ! arg!
230 coarseLocations.Add(sp.AbsolutePosition);
231 avatarUUIDs.Add(sp.UUID);
232 }
233 }
234 else
235 {
236 coarseLocations.Add(sp.AbsolutePosition);
237 avatarUUIDs.Add(sp.UUID);
238 }
239 } 221 }
240 } 222 }
241 223
@@ -751,6 +733,7 @@ namespace OpenSim.Region.Framework.Scenes
751 #endregion 733 #endregion
752 734
753 #region Get Methods 735 #region Get Methods
736
754 /// <summary> 737 /// <summary>
755 /// Get the controlling client for the given avatar, if there is one. 738 /// Get the controlling client for the given avatar, if there is one.
756 /// 739 ///
@@ -1092,36 +1075,6 @@ namespace OpenSim.Region.Framework.Scenes
1092 return Entities.GetEntities(); 1075 return Entities.GetEntities();
1093 } 1076 }
1094 1077
1095 public Dictionary<uint, float> GetTopScripts()
1096 {
1097 Dictionary<uint, float> topScripts = new Dictionary<uint, float>();
1098
1099 EntityBase[] EntityList = GetEntities();
1100 int limit = 0;
1101 foreach (EntityBase ent in EntityList)
1102 {
1103 if (ent is SceneObjectGroup)
1104 {
1105 SceneObjectGroup grp = (SceneObjectGroup)ent;
1106 if ((grp.RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0)
1107 {
1108 if (grp.scriptScore >= 0.01)
1109 {
1110 topScripts.Add(grp.LocalId, grp.scriptScore);
1111 limit++;
1112 if (limit >= 100)
1113 {
1114 break;
1115 }
1116 }
1117 grp.scriptScore = 0;
1118 }
1119 }
1120 }
1121
1122 return topScripts;
1123 }
1124
1125 #endregion 1078 #endregion
1126 1079
1127 #region Other Methods 1080 #region Other Methods