mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
* Some work in progress code: Inventory cache, start of inventory server/service, userprofile cache, inventory handling. (non of it is enabled yet (or at least it shouldn't be).
* Fixed some of the problems with crossing regions when flying: you should no longer sink to ground level when crossing (should keep roughly your right height). Should no longer sometimes get sent back to the centre of the current region when attempting to border cross. But instead sometimes you will find you avatar stop at the edge of region and you will need to start moving again to retry the crossing (which should then work). This code is partly based on Babblefrog's issue #212 patch. [I think I have some ideas of how to solve the stopping at edges problem, just want to get the inventory code done first] * Capabilities code has now been moved to the OpenSim.Framework.Communications project as some of the caps code will be tightly tied to inventory/asset handling and it was causing a two way reference problem when it was in its own project/dll. This is a Big commit as I was going to keep my inventory work local until I had it in a working state, in case it brakes anything, but its getting harder to keep in sync with svn.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Types;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Communications.Caches;
|
||||
|
||||
namespace OpenSim.Region.Communications.Local
|
||||
{
|
||||
@@ -36,8 +37,8 @@ namespace OpenSim.Region.Communications.Local
|
||||
public LocalBackEndServices SandBoxServices = new LocalBackEndServices();
|
||||
public LocalUserServices UserServices;
|
||||
|
||||
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer )
|
||||
: base(serversInfo, httpServer)
|
||||
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache )
|
||||
: base(serversInfo, httpServer, assetCache)
|
||||
{
|
||||
UserServices = new LocalUserServices(this, serversInfo);
|
||||
UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");
|
||||
|
||||
@@ -161,12 +161,21 @@ namespace OpenSim.Region.Communications.Local
|
||||
/// <param name="agentID"></param>
|
||||
/// <param name="position"></param>
|
||||
/// <returns></returns>
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
|
||||
{
|
||||
if (this.regionHosts.ContainsKey(regionHandle))
|
||||
{
|
||||
// Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
|
||||
this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
|
||||
this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID)
|
||||
{
|
||||
if (this.regionHosts.ContainsKey(regionHandle))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Framework.Types;
|
||||
using OpenSim.Framework.Servers;
|
||||
using OpenSim.Framework.Communications.Caches;
|
||||
|
||||
|
||||
namespace OpenSim.Region.Communications.OGS1
|
||||
{
|
||||
public class CommunicationsOGS1 : CommunicationsManager
|
||||
{
|
||||
|
||||
public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) :base(serversInfo, httpServer)
|
||||
public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache ) :base(serversInfo, httpServer, assetCache)
|
||||
{
|
||||
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
|
||||
GridServer = gridInterComms;
|
||||
|
||||
@@ -382,13 +382,13 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
/// <param name="agentID"></param>
|
||||
/// <param name="position"></param>
|
||||
/// <returns></returns>
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.listeners.ContainsKey(regionHandle))
|
||||
{
|
||||
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
|
||||
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
|
||||
return true;
|
||||
}
|
||||
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
|
||||
@@ -400,7 +400,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
"tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions");
|
||||
if (remObject != null)
|
||||
{
|
||||
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position);
|
||||
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -420,6 +420,15 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID)
|
||||
{
|
||||
if (this.listeners.ContainsKey(regionHandle))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods triggered by calls from external instances
|
||||
@@ -453,13 +462,13 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
/// <param name="agentID"></param>
|
||||
/// <param name="position"></param>
|
||||
/// <returns></returns>
|
||||
public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||
public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.listeners.ContainsKey(regionHandle))
|
||||
{
|
||||
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
|
||||
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using OpenSim.Framework.Types;
|
||||
namespace OpenSim.Region.Communications.OGS1
|
||||
{
|
||||
public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData);
|
||||
public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position);
|
||||
public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying);
|
||||
|
||||
public sealed class InterRegionSingleton
|
||||
{
|
||||
@@ -39,11 +39,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
|
||||
{
|
||||
if (OnArrival != null)
|
||||
{
|
||||
return OnArrival(regionHandle, agentID, position);
|
||||
return OnArrival(regionHandle, agentID, position, isFlying);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -69,11 +69,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
|
||||
{
|
||||
try
|
||||
{
|
||||
return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position);
|
||||
return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
|
||||
}
|
||||
catch (System.Runtime.Remoting.RemotingException e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user