* Did some initial work for prim crossing. Just glue so far.

* Added the child_get_tasks OpenSim.ini flag for testing the UDP packet sending code and packet throttler.   This flag gets purposely disabled in grid mode.  This flag also has the consequence that you can see the prim in neighboring regions without going into them.  Be warned, this causes tons of dropped packets.
This commit is contained in:
Teravus Ovares
2007-11-21 02:17:24 +00:00
parent 7b09800d5b
commit 7cb38712d5
14 changed files with 370 additions and 11 deletions

View File

@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
private readonly Mutex updateLock;
public bool m_physicalPrim;
public bool m_sendTasksToChild;
protected ModuleLoader m_moduleLoader;
protected StorageManager m_storageManager;
protected AgentCircuitManager m_authenticateHandler;
@@ -197,7 +198,7 @@ namespace OpenSim.Region.Environment.Scenes
public Scene(RegionInfo regInfo, AgentCircuitManager authen, PermissionManager permissionManager, CommunicationsManager commsMan, SceneCommunicationService sceneGridService,
AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim)
ModuleLoader moduleLoader, bool dumpAssetsToFile, bool physicalPrim, bool SendTasksToChild)
{
updateLock = new Mutex(false);
@@ -213,6 +214,7 @@ namespace OpenSim.Region.Environment.Scenes
m_datastore = m_regInfo.DataStore;
RegisterRegionWithComms();
m_physicalPrim = physicalPrim;
m_sendTasksToChild = SendTasksToChild;
m_LandManager = new LandManager(this, m_regInfo);
m_estateManager = new EstateManager(this, m_regInfo);

View File

@@ -20,6 +20,8 @@ namespace OpenSim.Region.Environment.Scenes
public event AgentCrossing OnAvatarCrossingIntoRegion;
public event ExpectUserDelegate OnExpectUser;
public event CloseAgentConnection OnCloseAgentConnection;
public event PrimCrossing OnPrimCrossingIntoRegion;
public SceneCommunicationService(CommunicationsManager commsMan)
{
@@ -34,7 +36,10 @@ namespace OpenSim.Region.Environment.Scenes
{
regionCommsHost.OnExpectUser += NewUserConnection;
regionCommsHost.OnAvatarCrossingIntoRegion += AgentCrossing;
regionCommsHost.OnPrimCrossingIntoRegion += PrimCrossing;
regionCommsHost.OnCloseAgentConnection += CloseConnection;
}
}
@@ -42,6 +47,7 @@ namespace OpenSim.Region.Environment.Scenes
{
regionCommsHost.OnExpectUser -= NewUserConnection;
regionCommsHost.OnAvatarCrossingIntoRegion -= AgentCrossing;
regionCommsHost.OnPrimCrossingIntoRegion -= PrimCrossing;
regionCommsHost.OnCloseAgentConnection -= CloseConnection;
m_commsProvider.GridService.DeregisterRegion(m_regionInfo);
regionCommsHost = null;
@@ -68,6 +74,13 @@ namespace OpenSim.Region.Environment.Scenes
OnAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying);
}
}
protected void PrimCrossing(ulong regionHandle, LLUUID primID, LLVector3 position, bool isPhysical)
{
if (OnPrimCrossingIntoRegion != null)
{
OnPrimCrossingIntoRegion(regionHandle, primID, position, isPhysical);
}
}
protected void CloseConnection(ulong regionHandle, LLUUID agentID)
{
@@ -222,6 +235,11 @@ namespace OpenSim.Region.Environment.Scenes
return m_commsProvider.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying);
}
public bool PrimCrossToNeighboringRegion(ulong regionhandle, LLUUID primID, LLVector3 position, bool isPhysical)
{
return m_commsProvider.InterRegion.ExpectPrimCrossing(regionhandle, primID, position, isPhysical);
}
public void CloseChildAgentConnections(ScenePresence presence)
{
foreach (ulong regionHandle in presence.KnownChildRegions)

View File

@@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
private bool m_newForce = false;
private bool m_newAvatar = false;
private bool m_newCoarseLocations = true;
private bool m_gotAllObjectsInScene = false;
private float m_avHeight = 127.0f;
protected RegionInfo m_regionInfo;
@@ -327,7 +328,14 @@ namespace OpenSim.Region.Environment.Scenes
// this.UpdateQuadTreeNode();
//this.RefreshQuadObject();
//}
if (!m_gotAllObjectsInScene)
{
if (!m_isChildAgent || m_scene.m_sendTasksToChild)
{
m_scene.SendAllSceneObjectsToClient(this);
m_gotAllObjectsInScene = true;
}
}
if (m_partsUpdateQueue.Count > 0)
{
bool runUpdate = true;
@@ -400,7 +408,12 @@ namespace OpenSim.Region.Environment.Scenes
AddToPhysicalScene();
m_physicsActor.Flying = isFlying;
m_scene.SendAllSceneObjectsToClient(this);
if (!m_gotAllObjectsInScene)
{
m_scene.SendAllSceneObjectsToClient(this);
m_gotAllObjectsInScene = true;
}
}
public void MakeChildAgent()
@@ -409,7 +422,7 @@ namespace OpenSim.Region.Environment.Scenes
m_isChildAgent = true;
RemoveFromPhysicalScene();
//this.Pos = new LLVector3(128, 128, 70);
}
@@ -952,7 +965,7 @@ namespace OpenSim.Region.Environment.Scenes
SendFullUpdateToOtherClient(avatar);
if (avatar.LocalId != LocalId)
{
if (!avatar.m_isChildAgent)
if (!avatar.m_isChildAgent || m_scene.m_sendTasksToChild)
{
avatar.SendFullUpdateToOtherClient(this);
avatar.SendAppearanceToOtherAgent(this);
@@ -985,7 +998,11 @@ namespace OpenSim.Region.Environment.Scenes
public void SendOwnAppearance( )
{
SendOwnWearables( );
//Ugly hack x.x - Trap set appearence to send all objects in this scene!
m_scene.SendAllSceneObjectsToClient(this);
m_gotAllObjectsInScene = true;
// TODO: remove this once the SunModule is slightly more tested
// m_controllingClient.SendViewerTime(m_scene.TimePhase);
}