aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs30
1 files changed, 25 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index b38148b..204c319 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -1412,10 +1412,25 @@ namespace OpenSim.Region.Framework.Scenes
1412 d.BeginInvoke(agent, newpos, neighbourx, neighboury, isFlying, CrossAgentToNewRegionCompleted, d); 1412 d.BeginInvoke(agent, newpos, neighbourx, neighboury, isFlying, CrossAgentToNewRegionCompleted, d);
1413 } 1413 }
1414 1414
1415 public void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position, Scene initiatingScene) 1415 public delegate void InformClientToInitateTeleportToLocationDelegate(ScenePresence agent, uint regionX, uint regionY,
1416 Vector3 position,
1417 Scene initiatingScene);
1418
1419 public void InformClientToInitateTeleportToLocation(ScenePresence agent, uint regionX, uint regionY, Vector3 position,
1420 Scene initiatingScene)
1421 {
1422
1423 // This assumes that we know what our neighbors are.
1424
1425 InformClientToInitateTeleportToLocationDelegate d = InformClientToInitiateTeleportToLocationAsync;
1426 d.BeginInvoke(agent,regionX,regionY,position,initiatingScene,
1427 InformClientToInitiateTeleportToLocationCompleted,
1428 d);
1429 }
1430
1431 public void InformClientToInitiateTeleportToLocationAsync(ScenePresence agent, uint regionX, uint regionY, Vector3 position,
1432 Scene initiatingScene)
1416 { 1433 {
1417 Util.FireAndForget(delegate
1418 {
1419 Thread.Sleep(10000); 1434 Thread.Sleep(10000);
1420 IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>(); 1435 IMessageTransferModule im = initiatingScene.RequestModuleInterface<IMessageTransferModule>();
1421 if (im != null) 1436 if (im != null)
@@ -1440,13 +1455,18 @@ namespace OpenSim.Region.Framework.Scenes
1440 }); 1455 });
1441 1456
1442 } 1457 }
1458 }
1443 1459
1444 }); 1460 private void InformClientToInitiateTeleportToLocationCompleted(IAsyncResult iar)
1461 {
1462 InformClientToInitateTeleportToLocationDelegate icon =
1463 (InformClientToInitateTeleportToLocationDelegate) iar.AsyncState;
1464 icon.EndInvoke(iar);
1445 } 1465 }
1446 1466
1447 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, bool isFlying); 1467 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, bool isFlying);
1448 1468
1449 /// <summary> 1469 /// <summary>
1450 /// This Closes child agents on neighboring regions 1470 /// This Closes child agents on neighboring regions
1451 /// Calls an asynchronous method to do so.. so it doesn't lag the sim. 1471 /// Calls an asynchronous method to do so.. so it doesn't lag the sim.
1452 /// </summary> 1472 /// </summary>