add newRegion parameter to CrossAgentToNewRegion event and trigger the event after crossing thread is invoked
parent
269a6410a0
commit
a2866b85f3
|
@ -1531,6 +1531,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync;
|
||||
d.BeginInvoke(agent, newpos, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d);
|
||||
|
||||
Scene.EventManager.TriggerCrossAgentToNewRegion(agent, isFlying, neighbourRegion);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public delegate void IncomingInstantMessage(GridInstantMessage message);
|
||||
public event IncomingInstantMessage OnIncomingInstantMessage;
|
||||
|
||||
public delegate void CrossAgentToNewRegion(ScenePresence sp, bool isFlying);
|
||||
public delegate void CrossAgentToNewRegion(ScenePresence sp, bool isFlying, GridRegion newRegion);
|
||||
public event CrossAgentToNewRegion OnCrossAgentToNewRegion;
|
||||
|
||||
public event IncomingInstantMessage OnUnhandledInstantMessage;
|
||||
|
@ -1963,7 +1963,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
|
||||
public void TriggerCrossAgentToNewRegion(ScenePresence agent, bool isFlying)
|
||||
public void TriggerCrossAgentToNewRegion(ScenePresence agent, bool isFlying, GridRegion newRegion)
|
||||
{
|
||||
CrossAgentToNewRegion handlerCrossAgentToNewRegion = OnCrossAgentToNewRegion;
|
||||
if (handlerCrossAgentToNewRegion != null)
|
||||
|
@ -1972,7 +1972,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
try
|
||||
{
|
||||
d(agent, isFlying);
|
||||
d(agent, isFlying, newRegion);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -4358,7 +4358,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
if (EntityTransferModule != null)
|
||||
{
|
||||
EventManager.TriggerCrossAgentToNewRegion(agent, isFlying);
|
||||
return EntityTransferModule.Cross(agent, isFlying);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue