aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 2bbb0a0..cde7f60 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1381,10 +1381,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1381 1381
1382 1382
1383 #region Agent Crossings 1383 #region Agent Crossings
1384
1385 public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out uint xDest, out uint yDest, out string version, out Vector3 newpos) 1384 public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out uint xDest, out uint yDest, out string version, out Vector3 newpos)
1386 { 1385 {
1386 string r = String.Empty;
1387 return GetDestination(scene, agentID, pos, out xDest, out yDest, out version, out newpos, out r);
1388 }
1389
1390 public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out uint xDest, out uint yDest, out string version, out Vector3 newpos, out string reason)
1391 {
1387 version = String.Empty; 1392 version = String.Empty;
1393 reason = String.Empty;
1388 newpos = pos; 1394 newpos = pos;
1389 1395
1390// m_log.DebugFormat( 1396// m_log.DebugFormat(
@@ -1498,8 +1504,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1498 } 1504 }
1499 1505
1500 GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y); 1506 GridRegion neighbourRegion = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
1501 1507
1502 string reason;
1503 if (!scene.SimulationService.QueryAccess(neighbourRegion, agentID, newpos, out version, out reason)) 1508 if (!scene.SimulationService.QueryAccess(neighbourRegion, agentID, newpos, out version, out reason))
1504 { 1509 {
1505 if (r == null) 1510 if (r == null)
@@ -1525,11 +1530,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1525 uint y; 1530 uint y;
1526 Vector3 newpos; 1531 Vector3 newpos;
1527 string version; 1532 string version;
1533 string reason;
1528 1534
1529 GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos); 1535 GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos, out reason);
1530 if (neighbourRegion == null) 1536 if (neighbourRegion == null)
1531 { 1537 {
1532 agent.ControllingClient.SendAlertMessage("Cannot region cross into void"); 1538 if (reason == String.Empty)
1539 agent.ControllingClient.SendAlertMessage("Cannot cross to region");
1540 else
1541 agent.ControllingClient.SendAlertMessage("Cannot cross to region: " + reason);
1533 return false; 1542 return false;
1534 } 1543 }
1535 1544