* Use the BeginInvoke methodology instead of the FireAndForget methodology to try to mitigate a mono assert. Same functionality done a different way.
parent
3562d75c17
commit
ed475f21ee
|
@ -1412,9 +1412,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
d.BeginInvoke(agent, newpos, neighbourx, neighboury, isFlying, CrossAgentToNewRegionCompleted, d);
|
||||
}
|
||||
|
||||
public void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position, Scene initiatingScene)
|
||||
public delegate void InformClientToInitateTeleportToLocationDelegate(ScenePresence agent, uint regionX, uint regionY,
|
||||
Vector3 position,
|
||||
Scene initiatingScene);
|
||||
|
||||
public void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position,
|
||||
Scene initiatingScene)
|
||||
{
|
||||
Util.FireAndForget(delegate
|
||||
|
||||
// This assumes that we know what our neighbors are.
|
||||
|
||||
InformClientToInitateTeleportToLocationDelegate d = InformClientToInitiateTeleportToLocationAsync;
|
||||
d.BeginInvoke(agent,regionX,regionY,position,initiatingScene,
|
||||
InformClientToInitiateTeleportToLocationCompleted,
|
||||
d);
|
||||
}
|
||||
|
||||
public void InformClientToInitiateTeleportToLocationAsync(ScenePresence agent, uint regionX, uint regionY, Vector3 position,
|
||||
Scene initiatingScene)
|
||||
{
|
||||
Thread.Sleep(10000);
|
||||
IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>();
|
||||
|
@ -1440,8 +1455,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
private void InformClientToInitiateTeleportToLocationCompleted(IAsyncResult iar)
|
||||
{
|
||||
InformClientToInitateTeleportToLocationDelegate icon =
|
||||
(InformClientToInitateTeleportToLocationDelegate) iar.AsyncState;
|
||||
icon.EndInvoke(iar);
|
||||
}
|
||||
|
||||
public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, bool isFlying);
|
||||
|
|
Loading…
Reference in New Issue