Merge commit '116fbe8258e336be3f6ac1e11119214629799faa' into bigmerge

Conflicts:
	OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
avinationmerge
Melanie 2011-10-25 03:06:18 +01:00
commit 1ec82bb000
3 changed files with 31 additions and 7 deletions

View File

@ -59,10 +59,15 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
public interface IScriptInstance public interface IScriptInstance
{ {
/// <summary> /// <summary>
/// Is this script currently running? /// Is the script currently running?
/// </summary> /// </summary>
bool Running { get; set; } bool Running { get; set; }
/// <summary>
/// Is the script suspended?
/// </summary>
bool Suspended { get; set; }
bool ShuttingDown { get; set; } bool ShuttingDown { get; set; }
string State { get; set; } string State { get; set; }
IScriptEngine Engine { get; } IScriptEngine Engine { get; }

View File

@ -96,7 +96,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
private bool m_startedFromSavedState; private bool m_startedFromSavedState;
private UUID m_CurrentStateHash; private UUID m_CurrentStateHash;
private UUID m_RegionID; private UUID m_RegionID;
private bool m_Suspended = false;
private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
m_LineMap; m_LineMap;
@ -140,6 +139,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
set { m_RunEvents = value; } set { m_RunEvents = value; }
} }
public bool Suspended { get; set; }
public bool ShuttingDown public bool ShuttingDown
{ {
get { return m_ShuttingDown; } get { return m_ShuttingDown; }
@ -651,7 +652,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
lock (m_EventQueue) lock (m_EventQueue)
{ {
if (m_Suspended) if (Suspended)
return 0; return 0;
lock (m_Script) lock (m_Script)
@ -1030,12 +1031,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
public void Suspend() public void Suspend()
{ {
m_Suspended = true; Suspended = true;
} }
public void Resume() public void Resume()
{ {
m_Suspended = false; Suspended = false;
} }
} }
} }

View File

@ -354,11 +354,29 @@ namespace OpenSim.Region.ScriptEngine.XEngine
foreach (IScriptInstance instance in m_Scripts.Values) foreach (IScriptInstance instance in m_Scripts.Values)
{ {
SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
string status;
if (instance.ShuttingDown)
{
status = "shutting down";
}
else if (instance.Suspended)
{
status = "suspended";
}
else if (!instance.Running)
{
status = "stopped";
}
else
{
status = "running";
}
MainConsole.Instance.OutputFormat( MainConsole.Instance.OutputFormat(
"{0}.{1}, script UUID {2}, prim UUID {3} @ {4}", "{0}.{1}, script UUID {2}, prim UUID {3} @ {4} ({5})",
instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID, instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID,
sop.AbsolutePosition, m_Scene.RegionInfo.RegionName); sop.AbsolutePosition, status);
} }
} }
} }