diff options
author | Justin Clark-Casey (justincc) | 2013-03-23 00:39:03 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-03-23 00:45:21 +0000 |
commit | 93206ef0fa6dffe93313455b3354ce3787e7262d (patch) | |
tree | ad7448b880e66529999ecb302f462982e51578b7 /OpenSim/Region/Framework | |
parent | Following on from 476a7d3e (which wasn't enough), make chat across regions on... (diff) | |
download | opensim-SC-93206ef0fa6dffe93313455b3354ce3787e7262d.zip opensim-SC-93206ef0fa6dffe93313455b3354ce3787e7262d.tar.gz opensim-SC-93206ef0fa6dffe93313455b3354ce3787e7262d.tar.bz2 opensim-SC-93206ef0fa6dffe93313455b3354ce3787e7262d.tar.xz |
Add "show borders" command to show the borders of a region.
This is relevant to mega-regions where the borders are very different to a regular region.
Also adds some method doc and other code comments.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Border.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 14 |
3 files changed, 16 insertions, 6 deletions
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 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)) |