aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-10 00:46:56 +0000
committerTeravus Ovares2007-12-10 00:46:56 +0000
commite595f82489ae91c2a913f2ac8445b3d5dbe160d0 (patch)
tree3c4c3ca6c42fefb3904f8eb211bfb38bac52ef0d /OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
parentAdded a call to m_host.SendFullUpdateToAllClients(). (diff)
downloadopensim-SC_OLD-e595f82489ae91c2a913f2ac8445b3d5dbe160d0.zip
opensim-SC_OLD-e595f82489ae91c2a913f2ac8445b3d5dbe160d0.tar.gz
opensim-SC_OLD-e595f82489ae91c2a913f2ac8445b3d5dbe160d0.tar.bz2
opensim-SC_OLD-e595f82489ae91c2a913f2ac8445b3d5dbe160d0.tar.xz
* Hooked up the GridComm event ChildDataUpdate to the scene.
* Added List<RegionInfo> m_neighbours to Scene * Hooked up the OnRegionUp event to m_neighbours list * Modified RegionInfo to have a bool commFailTF value so that we can skip neighbors that fail. (when the region comes up, this gets reset to false and the region will try again. * Added SetChildAgentThrottle(byte[]) to IClientAPI * Several other insignificant changes related to passing child pertanant agent data from sim to sim.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 04228de..4d2379b 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -23,6 +23,7 @@ namespace OpenSim.Region.Environment.Scenes
23 public event CloseAgentConnection OnCloseAgentConnection; 23 public event CloseAgentConnection OnCloseAgentConnection;
24 public event PrimCrossing OnPrimCrossingIntoRegion; 24 public event PrimCrossing OnPrimCrossingIntoRegion;
25 public event RegionUp OnRegionUp; 25 public event RegionUp OnRegionUp;
26 public event ChildAgentUpdate OnChildAgentUpdate;
26 27
27 public KillObjectDelegate KillObject; 28 public KillObjectDelegate KillObject;
28 public string _debugRegionName = ""; 29 public string _debugRegionName = "";
@@ -59,6 +60,8 @@ namespace OpenSim.Region.Environment.Scenes
59 regionCommsHost.OnPrimCrossingIntoRegion += PrimCrossing; 60 regionCommsHost.OnPrimCrossingIntoRegion += PrimCrossing;
60 regionCommsHost.OnCloseAgentConnection += CloseConnection; 61 regionCommsHost.OnCloseAgentConnection += CloseConnection;
61 regionCommsHost.OnRegionUp += newRegionUp; 62 regionCommsHost.OnRegionUp += newRegionUp;
63 regionCommsHost.OnChildAgentUpdate += ChildAgentUpdate;
64
62 } 65 }
63 else 66 else
64 { 67 {
@@ -70,6 +73,7 @@ namespace OpenSim.Region.Environment.Scenes
70 { 73 {
71 if (regionCommsHost != null) 74 if (regionCommsHost != null)
72 { 75 {
76 regionCommsHost.OnChildAgentUpdate -= ChildAgentUpdate;
73 regionCommsHost.OnRegionUp -= newRegionUp; 77 regionCommsHost.OnRegionUp -= newRegionUp;
74 regionCommsHost.OnExpectUser -= NewUserConnection; 78 regionCommsHost.OnExpectUser -= NewUserConnection;
75 regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing; 79 regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing;
@@ -105,6 +109,14 @@ namespace OpenSim.Region.Environment.Scenes
105 } 109 }
106 return true; 110 return true;
107 } 111 }
112 protected bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
113 {
114 if (OnChildAgentUpdate != null)
115 OnChildAgentUpdate(regionHandle, cAgentData);
116
117
118 return true;
119 }
108 120
109 protected void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 121 protected void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
110 { 122 {
@@ -262,6 +274,37 @@ namespace OpenSim.Region.Environment.Scenes
262 274
263 //bool val = m_commsProvider.InterRegion.RegionUp(new SearializableRegionInfo(region)); 275 //bool val = m_commsProvider.InterRegion.RegionUp(new SearializableRegionInfo(region));
264 } 276 }
277 public delegate void SendChildAgentDataUpdateDelegate(ulong regionHandle, ChildAgentDataUpdate cAgentData);
278
279 private void SendChildAgentDataUpdateAsync(ulong regionHandle, ChildAgentDataUpdate cAgentData)
280 {
281 MainLog.Instance.Notice("INTERGRID", "Informing a neighbor about my agent.");
282 bool regionAccepted = m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle,cAgentData);
283
284 if (regionAccepted)
285 {
286 MainLog.Instance.Notice("INTERGRID", "Completed sending a neighbor an update about my agent");
287 }
288 else
289 {
290 MainLog.Instance.Notice("INTERGRID", "Failed sending a neighbor an update about my agent");
291 }
292 }
293 private void SendChildAgentDataUpdateCompleted(IAsyncResult iar)
294 {
295 SendChildAgentDataUpdateDelegate icon = (SendChildAgentDataUpdateDelegate)iar.AsyncState;
296 icon.EndInvoke(iar);
297 }
298 public void SendChildAgentDataUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
299 {
300 // This assumes that we know what our neighbors are.
301 SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync;
302 d.BeginInvoke(regionHandle, cAgentData,
303 SendChildAgentDataUpdateCompleted,
304 d);
305
306 }
307
265 308
266 /// <summary> 309 /// <summary>
267 /// 310 ///