diff options
Diffstat (limited to 'OpenSim')
6 files changed, 60 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 25334b9..a30d8eb 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1011,6 +1011,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1011 | { | 1011 | { |
1012 | version = String.Empty; | 1012 | version = String.Empty; |
1013 | newpos = new Vector3(pos.X, pos.Y, pos.Z); | 1013 | newpos = new Vector3(pos.X, pos.Y, pos.Z); |
1014 | |||
1015 | // m_log.DebugFormat( | ||
1016 | // "[ENTITY TRANSFER MODULE]: Crossing agent {0} at pos {1} in {2}", agent.Name, pos, scene.Name); | ||
1017 | |||
1014 | uint neighbourx = scene.RegionInfo.RegionLocX; | 1018 | uint neighbourx = scene.RegionInfo.RegionLocX; |
1015 | uint neighboury = scene.RegionInfo.RegionLocY; | 1019 | uint neighboury = scene.RegionInfo.RegionLocY; |
1016 | const float boundaryDistance = 1.7f; | 1020 | const float boundaryDistance = 1.7f; |
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; | |||
33 | namespace OpenSim.Region.Framework.Scenes | 33 | namespace 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 6b031ae..c324d4b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2643,7 +2643,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2643 | 2643 | ||
2644 | } | 2644 | } |
2645 | } | 2645 | } |
2646 | |||
2647 | 2646 | ||
2648 | return null; | 2647 | return null; |
2649 | } | 2648 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 5ed7b67..322afd2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -456,9 +456,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
456 | { | 456 | { |
457 | m_pos = PhysicsActor.Position; | 457 | m_pos = PhysicsActor.Position; |
458 | 458 | ||
459 | //m_log.DebugFormat( | 459 | // m_log.DebugFormat( |
460 | // "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!", | 460 | // "[SCENE PRESENCE]: Set position of {0} in {1} to {2} via getting AbsolutePosition!", |
461 | // m_pos, Name, Scene.RegionInfo.RegionName); | 461 | // Name, Scene.Name, m_pos); |
462 | } | 462 | } |
463 | else | 463 | else |
464 | { | 464 | { |
@@ -485,6 +485,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
485 | } | 485 | } |
486 | set | 486 | set |
487 | { | 487 | { |
488 | // m_log.DebugFormat("[SCENE PRESENCE]: Setting position of {0} in {1} to {2}", Name, Scene.Name, value); | ||
489 | // Util.PrintCallStack(); | ||
490 | |||
488 | if (PhysicsActor != null) | 491 | if (PhysicsActor != null) |
489 | { | 492 | { |
490 | try | 493 | try |
@@ -1065,6 +1068,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1065 | else | 1068 | else |
1066 | AddToPhysicalScene(isFlying); | 1069 | AddToPhysicalScene(isFlying); |
1067 | 1070 | ||
1071 | // XXX: This is to trigger any secondary teleport needed for a megaregion when the user has teleported to a | ||
1072 | // location outside the 'root region' (the south-west 256x256 corner). This is the earlist we can do it | ||
1073 | // since it requires a physics actor to be present. If it is left any later, then physics appears to reset | ||
1074 | // the value to a negative position which does not trigger the border cross. | ||
1075 | // This may not be the best location for this. | ||
1076 | CheckForBorderCrossing(); | ||
1077 | |||
1068 | if (ForceFly) | 1078 | if (ForceFly) |
1069 | { | 1079 | { |
1070 | Flying = true; | 1080 | Flying = true; |
@@ -3121,6 +3131,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3121 | 3131 | ||
3122 | if (!IsInTransit) | 3132 | if (!IsInTransit) |
3123 | { | 3133 | { |
3134 | // m_log.DebugFormat( | ||
3135 | // "[SCENE PRESENCE]: Testing border check for projected position {0} of {1} in {2}", | ||
3136 | // pos2, Name, Scene.Name); | ||
3137 | |||
3124 | // Checks if where it's headed exists a region | 3138 | // Checks if where it's headed exists a region |
3125 | bool needsTransit = false; | 3139 | bool needsTransit = false; |
3126 | if (m_scene.TestBorderCross(pos2, Cardinals.W)) | 3140 | 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) |