aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Border.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs14
-rw-r--r--OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs31
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs8
6 files changed, 54 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 26267e2..136caad 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -994,6 +994,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
994 { 994 {
995 Scene scene = agent.Scene; 995 Scene scene = agent.Scene;
996 Vector3 pos = agent.AbsolutePosition; 996 Vector3 pos = agent.AbsolutePosition;
997
998// m_log.DebugFormat(
999// "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name);
1000
997 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z); 1001 Vector3 newpos = new Vector3(pos.X, pos.Y, pos.Z);
998 uint neighbourx = scene.RegionInfo.RegionLocX; 1002 uint neighbourx = scene.RegionInfo.RegionLocX;
999 uint neighboury = scene.RegionInfo.RegionLocY; 1003 uint neighboury = scene.RegionInfo.RegionLocY;
diff --git a/OpenSim/Region/Framework/Scenes/Border.cs b/OpenSim/Region/Framework/Scenes/Border.cs
index c6a6511..08c0c31 100644
--- a/OpenSim/Region/Framework/Scenes/Border.cs
+++ b/OpenSim/Region/Framework/Scenes/Border.cs
@@ -33,8 +33,7 @@ using OpenMetaverse;
33namespace OpenSim.Region.Framework.Scenes 33namespace OpenSim.Region.Framework.Scenes
34{ 34{
35 public class Border 35 public class Border
36 { 36 {
37
38 /// <summary> 37 /// <summary>
39 /// Line perpendicular to the Direction Cardinal. Z value is the 38 /// Line perpendicular to the Direction Cardinal. Z value is the
40 /// </summary> 39 /// </summary>
@@ -81,6 +80,10 @@ namespace OpenSim.Region.Framework.Scenes
81 TriggerRegionY = triggerRegionY; 80 TriggerRegionY = triggerRegionY;
82 } 81 }
83 82
83 /// <summary>
84 /// Tests to see if the given position would cross this border.
85 /// </summary>
86 /// <returns></returns>
84 public bool TestCross(Vector3 position) 87 public bool TestCross(Vector3 position)
85 { 88 {
86 bool result = false; 89 bool result = false;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index c9c0662..e8f00a4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2541,7 +2541,6 @@ namespace OpenSim.Region.Framework.Scenes
2541 2541
2542 } 2542 }
2543 } 2543 }
2544
2545 2544
2546 return null; 2545 return null;
2547 } 2546 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6d96c93..f7ae3a2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -442,9 +442,9 @@ namespace OpenSim.Region.Framework.Scenes
442 { 442 {
443 m_pos = PhysicsActor.Position; 443 m_pos = PhysicsActor.Position;
444 444
445 //m_log.DebugFormat( 445// m_log.DebugFormat(
446 // "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!", 446// "[SCENE PRESENCE]: Set position of {0} in {1} to {2} via getting AbsolutePosition!",
447 // m_pos, Name, Scene.RegionInfo.RegionName); 447// Name, Scene.Name, m_pos);
448 } 448 }
449 else 449 else
450 { 450 {
@@ -471,6 +471,9 @@ namespace OpenSim.Region.Framework.Scenes
471 } 471 }
472 set 472 set
473 { 473 {
474// m_log.DebugFormat("[SCENE PRESENCE]: Setting position of {0} in {1} to {2}", Name, Scene.Name, value);
475// Util.PrintCallStack();
476
474 if (PhysicsActor != null) 477 if (PhysicsActor != null)
475 { 478 {
476 try 479 try
@@ -878,6 +881,7 @@ namespace OpenSim.Region.Framework.Scenes
878 // before the inventory is processed in MakeRootAgent. This fixes a race condition 881 // before the inventory is processed in MakeRootAgent. This fixes a race condition
879 // related to the handling of attachments 882 // related to the handling of attachments
880 //m_scene.GetAvatarAppearance(ControllingClient, out Appearance); 883 //m_scene.GetAvatarAppearance(ControllingClient, out Appearance);
884
881 if (m_scene.TestBorderCross(pos, Cardinals.E)) 885 if (m_scene.TestBorderCross(pos, Cardinals.E))
882 { 886 {
883 Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E); 887 Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E);
@@ -2909,6 +2913,10 @@ namespace OpenSim.Region.Framework.Scenes
2909 2913
2910 if (!IsInTransit) 2914 if (!IsInTransit)
2911 { 2915 {
2916// m_log.DebugFormat(
2917// "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}",
2918// pos2, Name, Scene.Name);
2919
2912 // Checks if where it's headed exists a region 2920 // Checks if where it's headed exists a region
2913 bool needsTransit = false; 2921 bool needsTransit = false;
2914 if (m_scene.TestBorderCross(pos2, Cardinals.W)) 2922 if (m_scene.TestBorderCross(pos2, Cardinals.W))
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index 5fb74b0..29b39e0 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -116,6 +116,37 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
116 + "If teleport is true then some extra teleport debug information is logged.\n" 116 + "If teleport is true then some extra teleport debug information is logged.\n"
117 + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.", 117 + "If updates is true then any frame which exceeds double the maximum desired frame time is logged.",
118 HandleDebugSceneSetCommand); 118 HandleDebugSceneSetCommand);
119
120 scene.AddCommand(
121 "Regions",
122 this, "show borders", "show borders", "Show border information for regions", HandleShowBordersCommand);
123 }
124
125 private void HandleShowBordersCommand(string module, string[] args)
126 {
127 StringBuilder sb = new StringBuilder();
128 sb.AppendFormat("Borders for {0}:\n", m_scene.Name);
129
130 ConsoleDisplayTable cdt = new ConsoleDisplayTable();
131 cdt.AddColumn("Cross Direction", 15);
132 cdt.AddColumn("Line", 34);
133 cdt.AddColumn("Trigger Region", 14);
134
135 foreach (Border b in m_scene.NorthBorders)
136 cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
137
138 foreach (Border b in m_scene.EastBorders)
139 cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
140
141 foreach (Border b in m_scene.SouthBorders)
142 cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
143
144 foreach (Border b in m_scene.WestBorders)
145 cdt.AddRow(b.CrossDirection, b.BorderLine, string.Format("{0}, {1}", b.TriggerRegionX, b.TriggerRegionY));
146
147 cdt.AddToStringBuilder(sb);
148
149 MainConsole.Instance.Output(sb.ToString());
119 } 150 }
120 151
121 private void HandleDebugSceneGetCommand(string module, string[] args) 152 private void HandleDebugSceneGetCommand(string module, string[] args)
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 905540d..7127c73 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -415,18 +415,17 @@ namespace OpenSim.Region.RegionCombinerModule
415 */ 415 */
416 #endregion 416 #endregion
417 417
418 // If we're one region over +x y 418 // If we're one region over +x y (i.e. root region is to the west)
419 //xxx 419 //xxx
420 //xxy 420 //xxy
421 //xxx 421 //xxx
422
423 if (rootConn.PosX + rootConn.XEnd >= newConn.PosX && rootConn.PosY >= newConn.PosY) 422 if (rootConn.PosX + rootConn.XEnd >= newConn.PosX && rootConn.PosY >= newConn.PosY)
424 { 423 {
425 connectedYN = DoWorkForOneRegionOverPlusXY(rootConn, newConn, scene); 424 connectedYN = DoWorkForOneRegionOverPlusXY(rootConn, newConn, scene);
426 break; 425 break;
427 } 426 }
428 427
429 // If we're one region over x +y 428 // If we're one region over x +y (i.e. root region is to the south)
430 //xyx 429 //xyx
431 //xxx 430 //xxx
432 //xxx 431 //xxx
@@ -436,7 +435,7 @@ namespace OpenSim.Region.RegionCombinerModule
436 break; 435 break;
437 } 436 }
438 437
439 // If we're one region over +x +y 438 // If we're one region over +x +y (i.e. root region is to the south-west)
440 //xxy 439 //xxy
441 //xxx 440 //xxx
442 //xxx 441 //xxx
@@ -646,7 +645,6 @@ namespace OpenSim.Region.RegionCombinerModule
646 { 645 {
647 if (rootConn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2) 646 if (rootConn.RegionScene.EastBorders.Count == 1)// && conn.RegionScene.EastBorders.Count == 2)
648 { 647 {
649
650 rootConn.RegionScene.EastBorders[0].BorderLine.Z += (int)Constants.RegionSize; 648 rootConn.RegionScene.EastBorders[0].BorderLine.Z += (int)Constants.RegionSize;
651 649
652 lock (rootConn.RegionScene.NorthBorders) 650 lock (rootConn.RegionScene.NorthBorders)