diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1ddcb44a87..e577b23bdc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -224,6 +224,12 @@ namespace OpenSim.Region.Framework.Scenes public bool m_clampPrimSize; public bool m_trustBinaries; public bool m_allowScriptCrossings = true; + + /// + /// Can avatars cross from and to this region? + /// + public bool AllowAvatarCrossing { get; set; } + public bool m_useFlySlow; public bool m_useTrashOnDelete = true; @@ -1008,6 +1014,12 @@ namespace OpenSim.Region.Framework.Scenes #endregion Region Config + IConfig entityTransferConfig = m_config.Configs["EntityTransfer"]; + if (entityTransferConfig != null) + { + AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing); + } + #region Interest Management IConfig interestConfig = m_config.Configs["InterestManagement"]; @@ -1076,6 +1088,8 @@ namespace OpenSim.Region.Framework.Scenes CollidablePrims = true; PhysicsEnabled = true; + AllowAvatarCrossing = true; + PeriodicBackup = true; UseBackup = true; @@ -5576,6 +5590,9 @@ namespace OpenSim.Region.Framework.Scenes return true; } + if (!AllowAvatarCrossing && !viaTeleport) + return false; + // FIXME: Root agent count is currently known to be inaccurate. This forces a recount before we check. // However, the long term fix is to make sure root agent count is always accurate. m_sceneGraph.RecalculateStats(); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9d398ca67b..1b34bf22dc 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3210,7 +3210,8 @@ namespace OpenSim.Region.Framework.Scenes m_lastVelocity = Velocity; } - CheckForBorderCrossing(); + if (Scene.AllowAvatarCrossing) + CheckForBorderCrossing(); CheckForSignificantMovement(); // sends update to the modules. } diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 51522b8b33..3780e59a6d 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -711,6 +711,9 @@ ; max_distance = 65535 + ; Allow avatars to cross into and out of the region. + AllowAvatarCrossing = true + ; Minimum user level required for HyperGrid teleports LevelHGTeleport = 0