mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -550,6 +550,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </remarks>
|
||||
public event ScriptControlEvent OnScriptControlEvent;
|
||||
|
||||
public delegate void ScriptMovingStartEvent(uint localID);
|
||||
|
||||
/// <summary>
|
||||
/// TODO: Should be triggered when a physics object starts moving.
|
||||
/// </summary>
|
||||
public event ScriptMovingStartEvent OnScriptMovingStartEvent;
|
||||
|
||||
public delegate void ScriptMovingEndEvent(uint localID);
|
||||
|
||||
/// <summary>
|
||||
/// TODO: Should be triggered when a physics object stops moving.
|
||||
/// </summary>
|
||||
public event ScriptMovingEndEvent OnScriptMovingEndEvent;
|
||||
|
||||
public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
|
||||
|
||||
/// <summary>
|
||||
@@ -2238,6 +2252,48 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerMovingStartEvent(uint localID)
|
||||
{
|
||||
ScriptMovingStartEvent handlerScriptMovingStartEvent = OnScriptMovingStartEvent;
|
||||
if (handlerScriptMovingStartEvent != null)
|
||||
{
|
||||
foreach (ScriptMovingStartEvent d in handlerScriptMovingStartEvent.GetInvocationList())
|
||||
{
|
||||
try
|
||||
{
|
||||
d(localID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[EVENT MANAGER]: Delegate for TriggerMovingStartEvent failed - continuing. {0} {1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerMovingEndEvent(uint localID)
|
||||
{
|
||||
ScriptMovingEndEvent handlerScriptMovingEndEvent = OnScriptMovingEndEvent;
|
||||
if (handlerScriptMovingEndEvent != null)
|
||||
{
|
||||
foreach (ScriptMovingEndEvent d in handlerScriptMovingEndEvent.GetInvocationList())
|
||||
{
|
||||
try
|
||||
{
|
||||
d(localID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat(
|
||||
"[EVENT MANAGER]: Delegate for TriggerMovingEndEvent failed - continuing. {0} {1}",
|
||||
e.Message, e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerRequestChangeWaterHeight(float height)
|
||||
{
|
||||
if (height < 0)
|
||||
|
||||
Reference in New Issue
Block a user