diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 64b9abb..f32de2e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1391,6 +1391,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1391 | m_sceneGridService.OnCloseAgentConnection += CloseConnection; | 1391 | m_sceneGridService.OnCloseAgentConnection += CloseConnection; |
1392 | m_sceneGridService.OnRegionUp += OtherRegionUp; | 1392 | m_sceneGridService.OnRegionUp += OtherRegionUp; |
1393 | m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; | 1393 | m_sceneGridService.OnChildAgentUpdate += IncomingChildAgentDataUpdate; |
1394 | |||
1395 | |||
1394 | 1396 | ||
1395 | 1397 | ||
1396 | 1398 | ||
@@ -1492,19 +1494,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
1492 | public virtual bool IncomingChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) | 1494 | public virtual bool IncomingChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) |
1493 | { | 1495 | { |
1494 | ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); | 1496 | ScenePresence childAgentUpdate = GetScenePresence(new LLUUID(cAgentData.AgentID)); |
1495 | if (!(childAgentUpdate.Equals(null))) | 1497 | if (childAgentUpdate != null) |
1496 | { | 1498 | { |
1497 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. | 1499 | // I can't imagine *yet* why we would get an update if the agent is a root agent.. |
1498 | // however to avoid a race condition crossing borders.. | 1500 | // however to avoid a race condition crossing borders.. |
1499 | if (childAgentUpdate.IsChildAgent) | 1501 | if (childAgentUpdate.IsChildAgent) |
1500 | { | 1502 | { |
1503 | uint rRegionX = (uint)(cAgentData.regionHandle >> 40); | ||
1504 | uint rRegionY = (((uint)(cAgentData.regionHandle)) >> 8); | ||
1505 | uint tRegionX = RegionInfo.RegionLocX; | ||
1506 | uint tRegionY = RegionInfo.RegionLocY; | ||
1501 | //Send Data to ScenePresence | 1507 | //Send Data to ScenePresence |
1502 | childAgentUpdate.ChildAgentDataUpdate(cAgentData); | 1508 | childAgentUpdate.ChildAgentDataUpdate(cAgentData, tRegionX, tRegionY, rRegionX, rRegionY); |
1503 | // Not Implemented: | 1509 | // Not Implemented: |
1504 | //TODO: Do we need to pass the message on to one of our neighbors? | 1510 | //TODO: Do we need to pass the message on to one of our neighbors? |
1511 | |||
1505 | } | 1512 | } |
1513 | return true; | ||
1506 | } | 1514 | } |
1507 | return true; | 1515 | return false; |
1508 | } | 1516 | } |
1509 | 1517 | ||
1510 | /// <summary> | 1518 | /// <summary> |
@@ -1614,6 +1622,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1614 | return m_sceneGridService.CrossToNeighbouringRegion(regionHandle, agentID, position, isFlying); | 1622 | return m_sceneGridService.CrossToNeighbouringRegion(regionHandle, agentID, position, isFlying); |
1615 | } | 1623 | } |
1616 | 1624 | ||
1625 | public void SendOutChildAgentUpdates(ChildAgentDataUpdate cadu, ScenePresence presence) | ||
1626 | { | ||
1627 | m_sceneGridService.SendChildAgentDataUpdate(cadu, presence); | ||
1628 | } | ||
1629 | |||
1617 | #endregion | 1630 | #endregion |
1618 | 1631 | ||
1619 | #region Module Methods | 1632 | #region Module Methods |