diff options
author | Teravus Ovares | 2007-12-09 05:59:49 +0000 |
---|---|---|
committer | Teravus Ovares | 2007-12-09 05:59:49 +0000 |
commit | f2b175ef08066649a13b6a42f0a59d9bee503638 (patch) | |
tree | 084ef2d6e2c67358b85d62179aee98eaa838d25c /OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |
parent | added more packet handling stubs (diff) | |
download | opensim-SC-f2b175ef08066649a13b6a42f0a59d9bee503638.zip opensim-SC-f2b175ef08066649a13b6a42f0a59d9bee503638.tar.gz opensim-SC-f2b175ef08066649a13b6a42f0a59d9bee503638.tar.bz2 opensim-SC-f2b175ef08066649a13b6a42f0a59d9bee503638.tar.xz |
* Added some inter-region comms glue for allowing sims to chat amongst themsevles about an agent behind the agent's back.
* Will be using this glue Tomorrow/today to tell other regions what the agent's draw distance is and what region they're actually in so the region can make decisions on what prim to send, if any.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | 26 |
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 |