aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs5
3 files changed, 19 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 11f54a2..b04f6b6 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -99,6 +99,17 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
99 string ScriptName { get; } 99 string ScriptName { get; }
100 UUID ItemID { get; } 100 UUID ItemID { get; }
101 UUID ObjectID { get; } 101 UUID ObjectID { get; }
102
103 /// <summary>
104 /// UUID of the root object for the linkset that the script is in.
105 /// </summary>
106 UUID RootObjectID { get; }
107
108 /// <summary>
109 /// Local id of the root object for the linkset that the script is in.
110 /// </summary>
111 uint RootLocalID { get; }
112
102 uint LocalID { get; } 113 uint LocalID { get; }
103 UUID AssetID { get; } 114 UUID AssetID { get; }
104 Queue EventQueue { get; } 115 Queue EventQueue { get; }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index b177287..6e36742 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -164,6 +164,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
164 164
165 public uint LocalID { get; private set; } 165 public uint LocalID { get; private set; }
166 166
167 public UUID RootObjectID { get; private set; }
168
169 public uint RootLocalID { get; private set; }
170
167 public UUID AssetID { get; private set; } 171 public UUID AssetID { get; private set; }
168 172
169 public Queue EventQueue { get; private set; } 173 public Queue EventQueue { get; private set; }
@@ -198,6 +202,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
198 Engine = engine; 202 Engine = engine;
199 LocalID = part.LocalId; 203 LocalID = part.LocalId;
200 ObjectID = part.UUID; 204 ObjectID = part.UUID;
205 RootLocalID = part.ParentGroup.LocalId;
206 RootObjectID = part.ParentGroup.UUID;
201 ItemID = itemID; 207 ItemID = itemID;
202 AssetID = assetID; 208 AssetID = assetID;
203 PrimName = primName; 209 PrimName = primName;
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index bddb1b9..3697f78 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1083,7 +1083,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1083 1083
1084 if (!m_PrimObjects[localID].Contains(itemID)) 1084 if (!m_PrimObjects[localID].Contains(itemID))
1085 m_PrimObjects[localID].Add(itemID); 1085 m_PrimObjects[localID].Add(itemID);
1086
1087 } 1086 }
1088 1087
1089 if (!m_Assemblies.ContainsKey(assetID)) 1088 if (!m_Assemblies.ContainsKey(assetID))
@@ -1901,7 +1900,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1901 foreach (IScriptInstance si in m_Scripts.Values) 1900 foreach (IScriptInstance si in m_Scripts.Values)
1902 { 1901 {
1903 if (!topScripts.ContainsKey(si.LocalID)) 1902 if (!topScripts.ContainsKey(si.LocalID))
1904 topScripts[si.LocalID] = 0; 1903 topScripts[si.RootLocalID] = 0;
1905 1904
1906// long ticksElapsed = tickNow - si.MeasurementPeriodTickStart; 1905// long ticksElapsed = tickNow - si.MeasurementPeriodTickStart;
1907// float framesElapsed = ticksElapsed / (18.1818 * TimeSpan.TicksPerMillisecond); 1906// float framesElapsed = ticksElapsed / (18.1818 * TimeSpan.TicksPerMillisecond);
@@ -1937,7 +1936,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1937 float adjustedExecutionTime 1936 float adjustedExecutionTime
1938 = ((float)si.MeasurementPeriodExecutionTime / ticksElapsed) * 18.1818f; 1937 = ((float)si.MeasurementPeriodExecutionTime / ticksElapsed) * 18.1818f;
1939 1938
1940 topScripts[si.LocalID] += adjustedExecutionTime; 1939 topScripts[si.RootLocalID] += adjustedExecutionTime;
1941 } 1940 }
1942 } 1941 }
1943 1942