Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/Framework/Scenes/ScenePresence.csavinationmerge
commit
6ce9ed1a64
|
@ -1011,6 +1011,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
{
|
{
|
||||||
version = String.Empty;
|
version = String.Empty;
|
||||||
newpos = new Vector3(pos.X, pos.Y, pos.Z);
|
newpos = new Vector3(pos.X, pos.Y, pos.Z);
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name);
|
||||||
|
|
||||||
uint neighbourx = scene.RegionInfo.RegionLocX;
|
uint neighbourx = scene.RegionInfo.RegionLocX;
|
||||||
uint neighboury = scene.RegionInfo.RegionLocY;
|
uint neighboury = scene.RegionInfo.RegionLocY;
|
||||||
const float boundaryDistance = 1.7f;
|
const float boundaryDistance = 1.7f;
|
||||||
|
|
|
@ -33,8 +33,7 @@ using OpenMetaverse;
|
||||||
namespace OpenSim.Region.Framework.Scenes
|
namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
public class Border
|
public class Border
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Line perpendicular to the Direction Cardinal. Z value is the
|
/// Line perpendicular to the Direction Cardinal. Z value is the
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -81,6 +80,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
TriggerRegionY = triggerRegionY;
|
TriggerRegionY = triggerRegionY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tests to see if the given position would cross this border.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
public bool TestCross(Vector3 position)
|
public bool TestCross(Vector3 position)
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
|
@ -2643,7 +2643,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -456,9 +456,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_pos = PhysicsActor.Position;
|
m_pos = PhysicsActor.Position;
|
||||||
|
|
||||||
//m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!",
|
// "[SCENE PRESENCE]: Set position of {0} in {1} to {2} via getting AbsolutePosition!",
|
||||||
// m_pos, Name, Scene.RegionInfo.RegionName);
|
// Name, Scene.Name, m_pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -485,6 +485,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[SCENE PRESENCE]: Setting position of {0} in {1} to {2}", Name, Scene.Name, value);
|
||||||
|
// Util.PrintCallStack();
|
||||||
|
|
||||||
if (PhysicsActor != null)
|
if (PhysicsActor != null)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
@ -1065,6 +1068,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
AddToPhysicalScene(isFlying);
|
AddToPhysicalScene(isFlying);
|
||||||
|
|
||||||
|
// XXX: This is to trigger any secondary teleport needed for a megaregion when the user has teleported to a
|
||||||
|
// location outside the 'root region' (the south-west 256x256 corner). This is the earlist we can do it
|
||||||
|
// since it requires a physics actor to be present. If it is left any later, then physics appears to reset
|
||||||
|
// the value to a negative position which does not trigger the border cross.
|
||||||
|
// This may not be the best location for this.
|
||||||
|
CheckForBorderCrossing();
|
||||||
|
|
||||||
if (ForceFly)
|
if (ForceFly)
|
||||||
{
|
{
|
||||||
Flying = true;
|
Flying = true;
|
||||||
|
@ -3121,6 +3131,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (!IsInTransit)
|
if (!IsInTransit)
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
|
||||||
|
// pos2, Name, Scene.Name);
|
||||||
|
|
||||||
// Checks if where it's headed exists a region
|
// Checks if where it's headed exists a region
|
||||||
bool needsTransit = false;
|
bool needsTransit = false;
|
||||||
if (m_scene.TestBorderCross(pos2, Cardinals.W))
|
if (m_scene.TestBorderCross(pos2, Cardinals.W))
|
||||||
|
|
|
@ -116,6 +116,37 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
|
||||||
+ "If teleport is true then some extra teleport debug information is logged.\n"
|
+ "If teleport is true then some extra teleport debug information is logged.\n"
|
||||||
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
|
+ "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
|
||||||
HandleDebugSceneSetCommand);
|
HandleDebugSceneSetCommand);
|
||||||
|
|
||||||
|
scene.AddCommand(
|
||||||
|
"Regions",
|
||||||
|
this, "show borders", "show borders", "Show border information for regions", HandleShowBordersCommand);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleShowBordersCommand(string module, string[] args)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.AppendFormat("Borders for {0}:\n", m_scene.Name);
|
||||||
|
|
||||||
|
ConsoleDisplayTable cdt = new ConsoleDisplayTable();
|
||||||
|
cdt.AddColumn("Cross Direction", 15);
|
||||||
|
cdt.AddColumn("Line", 34);
|
||||||
|
cdt.AddColumn("Trigger Region", 14);
|
||||||
|
|
||||||
|
foreach (Border b in m_scene.NorthBorders)
|
||||||
|
cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
|
||||||
|
|
||||||
|
foreach (Border b in m_scene.EastBorders)
|
||||||
|
cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
|
||||||
|
|
||||||
|
foreach (Border b in m_scene.SouthBorders)
|
||||||
|
cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
|
||||||
|
|
||||||
|
foreach (Border b in m_scene.WestBorders)
|
||||||
|
cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
|
||||||
|
|
||||||
|
cdt.AddToStringBuilder(sb);
|
||||||
|
|
||||||
|
MainConsole.Instance.Output(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleDebugSceneGetCommand(string module, string[] args)
|
private void HandleDebugSceneGetCommand(string module, string[] args)
|
||||||
|
|
|
@ -415,18 +415,17 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
// If we're one region over +x y
|
// If we're one region over +x y (i.e. root region is to the west)
|
||||||
//xxx
|
//xxx
|
||||||
//xxy
|
//xxy
|
||||||
//xxx
|
//xxx
|
||||||
|
|
||||||
if (rootConn.PosX + rootConn.XEnd >= newConn.PosX && rootConn.PosY >= newConn.PosY)
|
if (rootConn.PosX + rootConn.XEnd >= newConn.PosX && rootConn.PosY >= newConn.PosY)
|
||||||
{
|
{
|
||||||
connectedYN = DoWorkForOneRegionOverPlusXY(rootConn, newConn, scene);
|
connectedYN = DoWorkForOneRegionOverPlusXY(rootConn, newConn, scene);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're one region over x +y
|
// If we're one region over x +y (i.e. root region is to the south)
|
||||||
//xyx
|
//xyx
|
||||||
//xxx
|
//xxx
|
||||||
//xxx
|
//xxx
|
||||||
|
@ -436,7 +435,7 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're one region over +x +y
|
// If we're one region over +x +y (i.e. root region is to the south-west)
|
||||||
//xxy
|
//xxy
|
||||||
//xxx
|
//xxx
|
||||||
//xxx
|
//xxx
|
||||||
|
@ -646,7 +645,6 @@ namespace OpenSim.Region.RegionCombinerModule
|
||||||
{
|
{
|
||||||
if (rootConn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2)
|
if (rootConn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2)
|
||||||
{
|
{
|
||||||
|
|
||||||
rootConn.RegionScene.EastBorders[0].BorderLine.Z += (int)Constants.RegionSize;
|
rootConn.RegionScene.EastBorders[0].BorderLine.Z += (int)Constants.RegionSize;
|
||||||
|
|
||||||
lock (rootConn.RegionScene.NorthBorders)
|
lock (rootConn.RegionScene.NorthBorders)
|
||||||
|
|
Loading…
Reference in New Issue