diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 31 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 9 |
2 files changed, 2 insertions, 38 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 |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 878476e..afb5ccf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -229,8 +229,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
229 | get { return RootPart.VolumeDetectActive; } | 229 | get { return RootPart.VolumeDetectActive; } |
230 | } | 230 | } |
231 | 231 | ||
232 | public float scriptScore; | ||
233 | |||
234 | private Vector3 lastPhysGroupPos; | 232 | private Vector3 lastPhysGroupPos; |
235 | private Quaternion lastPhysGroupRot; | 233 | private Quaternion lastPhysGroupRot; |
236 | 234 | ||
@@ -1184,12 +1182,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1184 | 1182 | ||
1185 | public void AddScriptLPS(int count) | 1183 | public void AddScriptLPS(int count) |
1186 | { | 1184 | { |
1187 | if (scriptScore + count >= float.MaxValue - count) | 1185 | m_scene.SceneGraph.AddToScriptLPS(count); |
1188 | scriptScore = 0; | ||
1189 | |||
1190 | scriptScore += (float)count; | ||
1191 | SceneGraph d = m_scene.SceneGraph; | ||
1192 | d.AddToScriptLPS(count); | ||
1193 | } | 1186 | } |
1194 | 1187 | ||
1195 | public void AddActiveScriptCount(int count) | 1188 | public void AddActiveScriptCount(int count) |