aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
index a7636da..683c471 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs
@@ -43,6 +43,8 @@ namespace OpenSim.Region.Communications.OGS1
43 43
44 public delegate bool RegionUp (SearializableRegionInfo region, ulong regionhandle); 44 public delegate bool RegionUp (SearializableRegionInfo region, ulong regionhandle);
45 45
46 public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate);
47
46 public sealed class InterRegionSingleton 48 public sealed class InterRegionSingleton
47 { 49 {
48 private static readonly InterRegionSingleton instance = new InterRegionSingleton(); 50 private static readonly InterRegionSingleton instance = new InterRegionSingleton();
@@ -52,6 +54,7 @@ namespace OpenSim.Region.Communications.OGS1
52 public event InformRegionPrimGroup OnPrimGroupNear; 54 public event InformRegionPrimGroup OnPrimGroupNear;
53 public event PrimGroupArrival OnPrimGroupArrival; 55 public event PrimGroupArrival OnPrimGroupArrival;
54 public event RegionUp OnRegionUp; 56 public event RegionUp OnRegionUp;
57 public event ChildAgentUpdate OnChildAgentUpdate;
55 58
56 59
57 static InterRegionSingleton() 60 static InterRegionSingleton()
@@ -86,6 +89,15 @@ namespace OpenSim.Region.Communications.OGS1
86 return false; 89 return false;
87 } 90 }
88 91
92 public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentUpdate)
93 {
94 if (OnChildAgentUpdate != null)
95 {
96 return OnChildAgentUpdate(regionHandle, cAgentUpdate);
97 }
98 return false;
99 }
100
89 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) 101 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
90 { 102 {
91 if (OnArrival != null) 103 if (OnArrival != null)
@@ -143,6 +155,20 @@ namespace OpenSim.Region.Communications.OGS1
143 } 155 }
144 } 156 }
145 157
158 public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData)
159 {
160 try
161 {
162 return InterRegionSingleton.Instance.ChildAgentUpdate(regionHandle,cAgentData);
163 }
164 catch (RemotingException e)
165 {
166 Console.WriteLine("Remoting Error: Unable to send Child agent update to remote region.\n" + e.ToString());
167 return false;
168 }
169
170 }
171
146 public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying) 172 public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying)
147 { 173 {
148 try 174 try