From f2b175ef08066649a13b6a42f0a59d9bee503638 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 9 Dec 2007 05:59:49 +0000 Subject: * 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. --- .../Communications/OGS1/OGS1InterSimComms.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs') 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 public delegate bool RegionUp (SearializableRegionInfo region, ulong regionhandle); + public delegate bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate childUpdate); + public sealed class InterRegionSingleton { private static readonly InterRegionSingleton instance = new InterRegionSingleton(); @@ -52,6 +54,7 @@ namespace OpenSim.Region.Communications.OGS1 public event InformRegionPrimGroup OnPrimGroupNear; public event PrimGroupArrival OnPrimGroupArrival; public event RegionUp OnRegionUp; + public event ChildAgentUpdate OnChildAgentUpdate; static InterRegionSingleton() @@ -86,6 +89,15 @@ namespace OpenSim.Region.Communications.OGS1 return false; } + public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentUpdate) + { + if (OnChildAgentUpdate != null) + { + return OnChildAgentUpdate(regionHandle, cAgentUpdate); + } + return false; + } + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying) { if (OnArrival != null) @@ -143,6 +155,20 @@ namespace OpenSim.Region.Communications.OGS1 } } + public bool ChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) + { + try + { + return InterRegionSingleton.Instance.ChildAgentUpdate(regionHandle,cAgentData); + } + catch (RemotingException e) + { + Console.WriteLine("Remoting Error: Unable to send Child agent update to remote region.\n" + e.ToString()); + return false; + } + + } + public bool ExpectAvatarCrossing(ulong regionHandle, Guid agentID, sLLVector3 position, bool isFlying) { try -- cgit v1.1