diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 66fb493..743b8ef 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -751,6 +751,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
751 | #endregion | 751 | #endregion |
752 | 752 | ||
753 | #region Get Methods | 753 | #region Get Methods |
754 | |||
754 | /// <summary> | 755 | /// <summary> |
755 | /// Get the controlling client for the given avatar, if there is one. | 756 | /// Get the controlling client for the given avatar, if there is one. |
756 | /// | 757 | /// |
@@ -1092,36 +1093,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1092 | return Entities.GetEntities(); | 1093 | return Entities.GetEntities(); |
1093 | } | 1094 | } |
1094 | 1095 | ||
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 | 1096 | #endregion |
1126 | 1097 | ||
1127 | #region Other Methods | 1098 | #region Other Methods |