From 17b4818b8e9a141b54540b342542bcb2ad21b4db Mon Sep 17 00:00:00 2001
From: MW
Date: Fri, 15 Jun 2007 16:03:02 +0000
Subject: Very Preliminary border crossing added to sugilite. (Note: Sugilite
doesn't have any backend ogs communication support yet so everything is
Sandbox mode only )
---
.../GridServer/GridCommsManagerBase.cs | 5 ++++
.../GridServer/GridCommsManagerLocal.cs | 5 ++++
.../InterSimComms/InterSimsCommsBase.cs | 2 ++
.../InterSimComms/InterSimsCommsLocal.cs | 5 ++++
.../InterSimComms/InterSimsCommsOGS.cs | 5 ++++
.../LocalBackEndServices.cs | 32 ++++++++++++++++++++++
Common/OpenSim.Framework/IRegionCommsHost.cs | 3 +-
Common/OpenSim.Framework/Interfaces/IClientAPI.cs | 3 +-
Common/OpenSim.Framework/RegionCommsHostBase.cs | 12 +++++++-
9 files changed, 69 insertions(+), 3 deletions(-)
(limited to 'Common')
diff --git a/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs
index 0b29f8a..357321d 100644
--- a/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs
+++ b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerBase.cs
@@ -58,6 +58,11 @@ namespace OpenGrid.Framework.Communications.GridServer
{
return null;
}
+
+ public virtual RegionInfo RequestNeighbourInfo(ulong regionHandle)
+ {
+ return null;
+ }
}
}
diff --git a/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerLocal.cs b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerLocal.cs
index 78ae712..3c1c29b 100644
--- a/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerLocal.cs
+++ b/Common/OpenGrid.Framework.Communications/GridServer/GridCommsManagerLocal.cs
@@ -54,5 +54,10 @@ namespace OpenGrid.Framework.Communications.GridServer
{
return sandBoxManager.RequestNeighbours(regionInfo);
}
+
+ public override RegionInfo RequestNeighbourInfo(ulong regionHandle)
+ {
+ return sandBoxManager.RequestNeighbourInfo(regionHandle);
+ }
}
}
diff --git a/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsBase.cs b/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsBase.cs
index 7977c53..50335c5 100644
--- a/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsBase.cs
+++ b/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsBase.cs
@@ -42,5 +42,7 @@ namespace OpenGrid.Framework.Communications
///
///
public abstract bool InformNeighbourOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
+ public abstract bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position);
+
}
}
diff --git a/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsLocal.cs b/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsLocal.cs
index d1a0b4f..d70376c 100644
--- a/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsLocal.cs
+++ b/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsLocal.cs
@@ -52,5 +52,10 @@ namespace OpenGrid.Framework.Communications
{
return sandBoxManager.InformNeighbourOfChildAgent(regionHandle, agentData);
}
+
+ public override bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
+ {
+ return sandBoxManager.ExpectAvatarCrossing(regionHandle, agentID, position);
+ }
}
}
diff --git a/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsOGS.cs b/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsOGS.cs
index 2cdd825..e631cf4 100644
--- a/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsOGS.cs
+++ b/Common/OpenGrid.Framework.Communications/InterSimComms/InterSimsCommsOGS.cs
@@ -39,5 +39,10 @@ namespace OpenGrid.Framework.Communications
{
return false;
}
+
+ public override bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
+ {
+ return false;
+ }
}
}
diff --git a/Common/OpenGrid.Framework.Communications/LocalBackEndServices.cs b/Common/OpenGrid.Framework.Communications/LocalBackEndServices.cs
index 6b923f6..928215e 100644
--- a/Common/OpenGrid.Framework.Communications/LocalBackEndServices.cs
+++ b/Common/OpenGrid.Framework.Communications/LocalBackEndServices.cs
@@ -96,6 +96,20 @@ namespace OpenGrid.Framework.Communications
}
///
+ ///
+ ///
+ ///
+ ///
+ public RegionInfo RequestNeighbourInfo(ulong regionHandle)
+ {
+ if (this.regions.ContainsKey(regionHandle))
+ {
+ return this.regions[regionHandle];
+ }
+ return null;
+ }
+
+ ///
///
///
///
@@ -113,6 +127,24 @@ namespace OpenGrid.Framework.Communications
}
///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
+ {
+ if (this.regionHosts.ContainsKey(regionHandle))
+ {
+ // Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
+ this.regionHosts[regionHandle].ExpectAvatarCrossing(regionHandle, agentID, position);
+ return true;
+ }
+ return false;
+ }
+
+ ///
/// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session
///
///
diff --git a/Common/OpenSim.Framework/IRegionCommsHost.cs b/Common/OpenSim.Framework/IRegionCommsHost.cs
index aa434c5..658afe6 100644
--- a/Common/OpenSim.Framework/IRegionCommsHost.cs
+++ b/Common/OpenSim.Framework/IRegionCommsHost.cs
@@ -35,12 +35,13 @@ namespace OpenSim.Framework
{
public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent);
public delegate void UpdateNeighbours(List neighbours);
+ public delegate void AgentCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position);
public interface IRegionCommsHost
{
event ExpectUserDelegate OnExpectUser;
event GenericCall2 OnExpectChildAgent;
- event GenericCall2 OnAvatarCrossingIntoRegion;
+ event AgentCrossing OnAvatarCrossingIntoRegion;
event UpdateNeighbours OnNeighboursUpdate;
}
}
diff --git a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
index cebfd9a..45d73ef 100644
--- a/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
+++ b/Common/OpenSim.Framework/Interfaces/IClientAPI.cs
@@ -125,9 +125,10 @@ namespace OpenSim.Framework.Interfaces
void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
void SendLayerData(float[] map);
- void MoveAgentIntoRegion(RegionInfo regInfo);
+ void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos);
void InformClientOfNeighbour(ulong neighbourHandle, System.Net.IPAddress neighbourIP, ushort neighbourPort);
AgentCircuitData RequestClientInfo();
+ void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, System.Net.IPAddress newRegionIP, ushort newRegionPort);
void SendAvatarData(RegionInfo regionInfo, string firstName, string lastName, LLUUID avatarID, uint avatarLocalID, LLVector3 Pos);
void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLVector3 velocity);
diff --git a/Common/OpenSim.Framework/RegionCommsHostBase.cs b/Common/OpenSim.Framework/RegionCommsHostBase.cs
index 6a08eb8..88751b8 100644
--- a/Common/OpenSim.Framework/RegionCommsHostBase.cs
+++ b/Common/OpenSim.Framework/RegionCommsHostBase.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
{
public event ExpectUserDelegate OnExpectUser;
public event GenericCall2 OnExpectChildAgent;
- public event GenericCall2 OnAvatarCrossingIntoRegion;
+ public event AgentCrossing OnAvatarCrossingIntoRegion;
public event UpdateNeighbours OnNeighboursUpdate;
///
@@ -55,5 +55,15 @@ namespace OpenSim.Framework
return false;
}
+
+ public virtual bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
+ {
+ if (OnAvatarCrossingIntoRegion != null)
+ {
+ OnAvatarCrossingIntoRegion(regionHandle, agentID, position);
+ return true;
+ }
+ return false;
+ }
}
}
--
cgit v1.1