aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 84de71f..d6e905b 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -846,6 +846,37 @@ namespace OpenSim.Region.Environment.Scenes
846 return result; 846 return result;
847 } 847 }
848 848
849 public Dictionary<uint, float> GetTopScripts()
850 {
851 Dictionary<uint, float> topScripts = new Dictionary<uint, float>();
852
853 List<EntityBase> EntityList = GetEntities();
854 int limit = 0;
855 foreach (EntityBase ent in EntityList)
856 {
857 if (ent is SceneObjectGroup)
858 {
859 SceneObjectGroup grp = (SceneObjectGroup)ent;
860 if ((grp.RootPart.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Scripted) != 0)
861 {
862 if (grp.scriptScore >= 0.01)
863 {
864 topScripts.Add(grp.LocalId, grp.scriptScore);
865 limit++;
866 if (limit >= 100)
867 {
868 break;
869 }
870
871 }
872 grp.scriptScore = 0;
873 }
874 }
875 }
876
877 return topScripts;
878 }
879
849 #endregion 880 #endregion
850 881
851 #region Other Methods 882 #region Other Methods