* refactor: call some EventManager triggers directly rather than through scene
parent
bce5ed5812
commit
30ffefb67b
|
@ -534,7 +534,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return found;
|
||||
}
|
||||
|
||||
|
||||
// Alias IncomingHelloNeighbour OtherRegionUp, for now
|
||||
public bool IncomingHelloNeighbour(RegionInfo neighbour)
|
||||
{
|
||||
|
@ -3065,21 +3064,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
scriptEngine.InitializeEngine(this);
|
||||
}
|
||||
|
||||
public void TriggerObjectChanged(uint localID, uint change)
|
||||
{
|
||||
m_eventManager.TriggerOnScriptChangedEvent(localID, change);
|
||||
}
|
||||
|
||||
public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos)
|
||||
{
|
||||
m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos);
|
||||
}
|
||||
|
||||
public void TriggerNotAtTargetEvent(uint localID)
|
||||
{
|
||||
m_eventManager.TriggerNotAtTargetEvent(localID);
|
||||
}
|
||||
|
||||
private bool ScriptDanger(SceneObjectPart part,Vector3 pos)
|
||||
{
|
||||
ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y);
|
||||
|
|
|
@ -2939,6 +2939,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (atTargets.Count > 0)
|
||||
{
|
||||
uint[] localids = new uint[0];
|
||||
|
@ -2952,16 +2953,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
cntr++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int ctr = 0; ctr < localids.Length; ctr++)
|
||||
{
|
||||
foreach (uint target in atTargets.Keys)
|
||||
{
|
||||
scriptPosTarget att = atTargets[target];
|
||||
m_scene.TriggerAtTargetEvent(localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition);
|
||||
m_scene.EventManager.TriggerAtTargetEvent(
|
||||
localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_scriptListens_notAtTarget && !at_target)
|
||||
{
|
||||
//trigger not_at_target
|
||||
|
@ -2976,9 +2981,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
cntr++;
|
||||
}
|
||||
}
|
||||
|
||||
for (int ctr = 0; ctr < localids.Length; ctr++)
|
||||
{
|
||||
m_scene.TriggerNotAtTargetEvent(localids[ctr]);
|
||||
m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3101,11 +3101,8 @@ if (m_shape != null) {
|
|||
|
||||
public void TriggerScriptChangedEvent(Changed val)
|
||||
{
|
||||
if (m_parentGroup != null)
|
||||
{
|
||||
if (m_parentGroup.Scene != null)
|
||||
m_parentGroup.Scene.TriggerObjectChanged(LocalId, (uint)val);
|
||||
}
|
||||
if (m_parentGroup != null && m_parentGroup.Scene != null)
|
||||
m_parentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val);
|
||||
}
|
||||
|
||||
public void TrimPermissions()
|
||||
|
|
Loading…
Reference in New Issue