From c20f7d6171a9df151c3ccde063336338da9ae322 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 25 May 2008 20:50:45 +0000 Subject: * A hacky Top Scripts display. It isn't accurate as far as ms accounting, however you can use it to help find out what scripts are causing your simulator to cry. * Access it from the Estate tools/Debug tab. --- OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 25b3d16..cd4be99 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -90,6 +90,7 @@ namespace OpenSim.Region.Environment.Scenes /// since the group's last persistent backup /// public bool HasGroupChanged = false; + public float scriptScore = 0f; @@ -959,6 +960,10 @@ namespace OpenSim.Region.Environment.Scenes public void AddScriptLPS(int count) { + if (scriptScore + count >= float.MaxValue - count) + scriptScore = 0; + + scriptScore += (float)count; InnerScene d = m_scene.m_innerScene; d.AddToScriptLPS(count); } -- cgit v1.1