Add the option to link a scene object with a monitoring object

For debugging purposes.
melanie
Melanie Thielker 2017-02-09 23:16:23 +00:00
parent 27fdf3094d
commit 91f142bbd2
2 changed files with 15 additions and 0 deletions

View File

@ -376,6 +376,8 @@ namespace OpenSim.Region.Framework.Scenes
public bool m_dupeInProgress = false; public bool m_dupeInProgress = false;
internal Dictionary<UUID, string> m_savedScriptState; internal Dictionary<UUID, string> m_savedScriptState;
public UUID MonitoringObject { get; set; }
#region Properties #region Properties
/// <summary> /// <summary>

View File

@ -424,6 +424,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return lease; return lease;
} }
protected SceneObjectPart MonitoringObject()
{
UUID m = m_host.ParentGroup.MonitoringObject;
if (m == UUID.Zero)
return null;
SceneObjectPart p = m_ScriptEngine.World.GetSceneObjectPart(m);
if (p == null)
m_host.ParentGroup.MonitoringObject = UUID.Zero;
return p;
}
protected virtual void ScriptSleep(int delay) protected virtual void ScriptSleep(int delay)
{ {
delay = (int)((float)delay * m_ScriptDelayFactor); delay = (int)((float)delay * m_ScriptDelayFactor);