aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs22
3 files changed, 31 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 0cc0fe7..d3200d5 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -59,10 +59,15 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
59 public interface IScriptInstance 59 public interface IScriptInstance
60 { 60 {
61 /// <summary> 61 /// <summary>
62 /// Is this script currently running? 62 /// Is the script currently running?
63 /// </summary> 63 /// </summary>
64 bool Running { get; set; } 64 bool Running { get; set; }
65 65
66 /// <summary>
67 /// Is the script suspended?
68 /// </summary>
69 bool Suspended { get; set; }
70
66 bool ShuttingDown { get; set; } 71 bool ShuttingDown { get; set; }
67 string State { get; set; } 72 string State { get; set; }
68 IScriptEngine Engine { get; } 73 IScriptEngine Engine { get; }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 3313b18..9d48e94 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -95,7 +95,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
95 private bool m_startedFromSavedState; 95 private bool m_startedFromSavedState;
96 private UUID m_CurrentStateHash; 96 private UUID m_CurrentStateHash;
97 private UUID m_RegionID; 97 private UUID m_RegionID;
98 private bool m_Suspended = false;
99 98
100 private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> 99 private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
101 m_LineMap; 100 m_LineMap;
@@ -139,6 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
139 set { m_RunEvents = value; } 138 set { m_RunEvents = value; }
140 } 139 }
141 140
141 public bool Suspended { get; set; }
142
142 public bool ShuttingDown 143 public bool ShuttingDown
143 { 144 {
144 get { return m_ShuttingDown; } 145 get { return m_ShuttingDown; }
@@ -644,7 +645,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
644 /// <returns></returns> 645 /// <returns></returns>
645 public object EventProcessor() 646 public object EventProcessor()
646 { 647 {
647 if (m_Suspended) 648 if (Suspended)
648 return 0; 649 return 0;
649 650
650 lock (m_Script) 651 lock (m_Script)
@@ -1026,12 +1027,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1026 1027
1027 public void Suspend() 1028 public void Suspend()
1028 { 1029 {
1029 m_Suspended = true; 1030 Suspended = true;
1030 } 1031 }
1031 1032
1032 public void Resume() 1033 public void Resume()
1033 { 1034 {
1034 m_Suspended = false; 1035 Suspended = false;
1035 } 1036 }
1036 } 1037 }
1037} 1038}
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 9f8ee1c..c74cd64 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -286,11 +286,29 @@ namespace OpenSim.Region.ScriptEngine.XEngine
286 foreach (IScriptInstance instance in m_Scripts.Values) 286 foreach (IScriptInstance instance in m_Scripts.Values)
287 { 287 {
288 SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); 288 SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
289 string status;
290
291 if (instance.ShuttingDown)
292 {
293 status = "shutting down";
294 }
295 else if (instance.Suspended)
296 {
297 status = "suspended";
298 }
299 else if (!instance.Running)
300 {
301 status = "stopped";
302 }
303 else
304 {
305 status = "running";
306 }
289 307
290 MainConsole.Instance.OutputFormat( 308 MainConsole.Instance.OutputFormat(
291 "{0}.{1}, script UUID {2}, prim UUID {3} @ {4}", 309 "{0}.{1}, script UUID {2}, prim UUID {3} @ {4} ({5})",
292 instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID, 310 instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID,
293 sop.AbsolutePosition, m_Scene.RegionInfo.RegionName); 311 sop.AbsolutePosition, status);
294 } 312 }
295 } 313 }
296 } 314 }