mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
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.
This commit is contained in:
@@ -33,8 +33,7 @@ using OpenMetaverse;
|
||||
namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
public class Border
|
||||
{
|
||||
|
||||
{
|
||||
/// <summary>
|
||||
/// Line perpendicular to the Direction Cardinal. Z value is the
|
||||
/// </summary>
|
||||
@@ -81,6 +80,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
TriggerRegionY = triggerRegionY;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests to see if the given position would cross this border.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool TestCross(Vector3 position)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
@@ -2541,7 +2541,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -442,9 +442,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
m_pos = PhysicsActor.Position;
|
||||
|
||||
//m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!",
|
||||
// m_pos, Name, Scene.RegionInfo.RegionName);
|
||||
// m_log.DebugFormat(
|
||||
// "[SCENE PRESENCE]: Set position of {0} in {1} to {2} via getting AbsolutePosition!",
|
||||
// Name, Scene.Name, m_pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -471,6 +471,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
set
|
||||
{
|
||||
// m_log.DebugFormat("[SCENE PRESENCE]: Setting position of {0} in {1} to {2}", Name, Scene.Name, value);
|
||||
// Util.PrintCallStack();
|
||||
|
||||
if (PhysicsActor != null)
|
||||
{
|
||||
try
|
||||
@@ -878,6 +881,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// before the inventory is processed in MakeRootAgent. This fixes a race condition
|
||||
// related to the handling of attachments
|
||||
//m_scene.GetAvatarAppearance(ControllingClient, out Appearance);
|
||||
|
||||
if (m_scene.TestBorderCross(pos, Cardinals.E))
|
||||
{
|
||||
Border crossedBorder = m_scene.GetCrossedBorder(pos, Cardinals.E);
|
||||
@@ -2909,6 +2913,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
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
|
||||
bool needsTransit = false;
|
||||
if (m_scene.TestBorderCross(pos2, Cardinals.W))
|
||||
|
||||
Reference in New Issue
Block a user