From 70fa30204272e874b8e3acccdc2e22cd4e42b2b2 Mon Sep 17 00:00:00 2001
From: MW
Date: Sun, 22 Jul 2007 11:44:36 +0000
Subject: * 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.
---
OpenSim/Region/Environment/Scenes/Scene.cs | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 64676f0..518a53f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -37,7 +37,7 @@ using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Physics.Manager;
-using OpenSim.Region.Caches;
+using OpenSim.Framework.Communications.Caches;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Scripting;
using OpenSim.Region.Terrain;
@@ -550,13 +550,14 @@ namespace OpenSim.Region.Environment.Scenes
m_estateManager.sendRegionHandshake(client);
CreateAndAddScenePresence(client);
m_LandManager.sendParcelOverlay(client);
- //commsManager.UserProfilesCache.AddNewUser(client.AgentId);
+ commsManager.UserProfilesCache.AddNewUser(client.AgentId);
}
protected virtual void SubscribeToClientEvents(IClientAPI client)
{
client.OnRegionHandShakeReply += SendLayerData;
//remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
+ client.OnModifyTerrain += ModifyTerrain;
client.OnChatFromViewer += SimChat;
client.OnInstantMessage += InstantMessage;
client.OnRequestWearables += InformClientOfNeighbours;
@@ -592,9 +593,11 @@ namespace OpenSim.Region.Environment.Scenes
new ParcelObjectOwnerRequest(m_LandManager.handleParcelObjectOwnersRequest);
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
-
- //client.OnCreateNewInventoryFolder += commsManager.UserProfilesCache.HandleCreateInventoryFolder;
+
+ // client.OnCreateNewInventoryItem += CreateNewInventoryItem;
+ // client.OnCreateNewInventoryFolder += commsManager.UserProfilesCache.HandleCreateInventoryFolder;
// client.OnFetchInventoryDescendents += commsManager.UserProfilesCache.HandleFecthInventoryDescendents;
+ // client.OnRequestTaskInventory += RequestTaskInventory;
}
protected ScenePresence CreateAndAddScenePresence(IClientAPI client)
@@ -819,13 +822,13 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
+ public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
if (regionHandle == m_regInfo.RegionHandle)
{
if (Avatars.ContainsKey(agentID))
{
- Avatars[agentID].MakeAvatar(position);
+ Avatars[agentID].MakeAvatar(position, isFlying);
}
}
}
@@ -909,7 +912,7 @@ namespace OpenSim.Region.Environment.Scenes
agent.startpos = new LLVector3(128, 128, 70);
agent.child = true;
commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent);
- commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position);
+ commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position, false);
remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4));
}
@@ -922,9 +925,9 @@ namespace OpenSim.Region.Environment.Scenes
///
///
///
- public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position)
+ public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
- return commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position);
+ return commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying);
}
public void performParcelPrimCountUpdate()
--
cgit v1.1