Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
commit
d6a7f284a2
|
@ -299,10 +299,56 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
//xxy
|
//xxy
|
||||||
//xxx
|
//xxx
|
||||||
|
|
||||||
|
|
||||||
if ((((int)conn.X * (int)Constants.RegionSize) + conn.XEnd
|
if ((((int)conn.X * (int)Constants.RegionSize) + conn.XEnd
|
||||||
>= (regionConnections.X * (int)Constants.RegionSize))
|
>= (regionConnections.X * (int)Constants.RegionSize))
|
||||||
&& (((int)conn.Y * (int)Constants.RegionSize)
|
&& (((int)conn.Y * (int)Constants.RegionSize)
|
||||||
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
||||||
|
{
|
||||||
|
connectedYN = DoWorkForOneRegionOverPlusXY(conn, regionConnections, scene);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we're one region over x +y
|
||||||
|
//xyx
|
||||||
|
//xxx
|
||||||
|
//xxx
|
||||||
|
if ((((int)conn.X * (int)Constants.RegionSize)
|
||||||
|
>= (regionConnections.X * (int)Constants.RegionSize))
|
||||||
|
&& (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd
|
||||||
|
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
||||||
|
{
|
||||||
|
connectedYN = DoWorkForOneRegionOverXPlusY(conn, regionConnections, scene);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we're one region over +x +y
|
||||||
|
//xxy
|
||||||
|
//xxx
|
||||||
|
//xxx
|
||||||
|
if ((((int)conn.X * (int)Constants.RegionSize) + conn.YEnd
|
||||||
|
>= (regionConnections.X * (int)Constants.RegionSize))
|
||||||
|
&& (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd
|
||||||
|
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
||||||
|
{
|
||||||
|
connectedYN = DoWorkForOneRegionOverPlusXPlusY(conn, regionConnections, scene);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If !connectYN means that this region is a root region
|
||||||
|
if (!connectedYN)
|
||||||
|
{
|
||||||
|
DoWorkForRootRegion(regionConnections, scene);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Set up infinite borders around the entire AABB of the combined ConnectedRegions
|
||||||
|
AdjustLargeRegionBounds();
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool DoWorkForOneRegionOverPlusXY(RegionConnections conn, RegionConnections regionConnections, Scene scene)
|
||||||
{
|
{
|
||||||
Vector3 offset = Vector3.Zero;
|
Vector3 offset = Vector3.Zero;
|
||||||
offset.X = (((regionConnections.X * (int)Constants.RegionSize)) -
|
offset.X = (((regionConnections.X * (int)Constants.RegionSize)) -
|
||||||
|
@ -368,18 +414,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
// Create a client event forwarder and add this region's events to the root region.
|
// Create a client event forwarder and add this region's events to the root region.
|
||||||
if (conn.ClientEventForwarder != null)
|
if (conn.ClientEventForwarder != null)
|
||||||
conn.ClientEventForwarder.AddSceneToEventForwarding(scene);
|
conn.ClientEventForwarder.AddSceneToEventForwarding(scene);
|
||||||
connectedYN = true;
|
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're one region over x +y
|
private bool DoWorkForOneRegionOverXPlusY(RegionConnections conn, RegionConnections regionConnections, Scene scene)
|
||||||
//xyx
|
|
||||||
//xxx
|
|
||||||
//xxx
|
|
||||||
if ((((int)conn.X * (int)Constants.RegionSize)
|
|
||||||
>= (regionConnections.X * (int)Constants.RegionSize))
|
|
||||||
&& (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd
|
|
||||||
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
|
||||||
{
|
{
|
||||||
Vector3 offset = Vector3.Zero;
|
Vector3 offset = Vector3.Zero;
|
||||||
offset.X = (((regionConnections.X * (int)Constants.RegionSize)) -
|
offset.X = (((regionConnections.X * (int)Constants.RegionSize)) -
|
||||||
|
@ -430,18 +469,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
conn.RegionScene.BordersLocked = false;
|
conn.RegionScene.BordersLocked = false;
|
||||||
if (conn.ClientEventForwarder != null)
|
if (conn.ClientEventForwarder != null)
|
||||||
conn.ClientEventForwarder.AddSceneToEventForwarding(scene);
|
conn.ClientEventForwarder.AddSceneToEventForwarding(scene);
|
||||||
connectedYN = true;
|
return true;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're one region over +x +y
|
private bool DoWorkForOneRegionOverPlusXPlusY(RegionConnections conn, RegionConnections regionConnections, Scene scene)
|
||||||
//xxy
|
|
||||||
//xxx
|
|
||||||
//xxx
|
|
||||||
if ((((int)conn.X * (int)Constants.RegionSize) + conn.YEnd
|
|
||||||
>= (regionConnections.X * (int)Constants.RegionSize))
|
|
||||||
&& (((int)conn.Y * (int)Constants.RegionSize) + conn.YEnd
|
|
||||||
>= (regionConnections.Y * (int)Constants.RegionSize)))
|
|
||||||
{
|
{
|
||||||
Vector3 offset = Vector3.Zero;
|
Vector3 offset = Vector3.Zero;
|
||||||
offset.X = (((regionConnections.X * (int)Constants.RegionSize)) -
|
offset.X = (((regionConnections.X * (int)Constants.RegionSize)) -
|
||||||
|
@ -535,16 +566,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (conn.ClientEventForwarder != null)
|
if (conn.ClientEventForwarder != null)
|
||||||
conn.ClientEventForwarder.AddSceneToEventForwarding(scene);
|
conn.ClientEventForwarder.AddSceneToEventForwarding(scene);
|
||||||
|
|
||||||
connectedYN = true;
|
return true;
|
||||||
|
|
||||||
//scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset,extents);
|
//scene.PhysicsScene.Combine(conn.RegionScene.PhysicsScene, offset,extents);
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If !connectYN means that this region is a root region
|
private void DoWorkForRootRegion(RegionConnections regionConnections, Scene scene)
|
||||||
if (!connectedYN)
|
|
||||||
{
|
{
|
||||||
RegionData rdata = new RegionData();
|
RegionData rdata = new RegionData();
|
||||||
rdata.Offset = Vector3.Zero;
|
rdata.Offset = Vector3.Zero;
|
||||||
|
@ -574,10 +602,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
// Adds this root region to a dictionary of regions that are connectable
|
// Adds this root region to a dictionary of regions that are connectable
|
||||||
m_regions.Add(scene.RegionInfo.originRegionID, regionConnections);
|
m_regions.Add(scene.RegionInfo.originRegionID, regionConnections);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Set up infinite borders around the entire AABB of the combined ConnectedRegions
|
|
||||||
AdjustLargeRegionBounds();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetCourseLocationDelegate(ScenePresence presence)
|
private void SetCourseLocationDelegate(ScenePresence presence)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue