diff options
author | Justin Clark-Casey (justincc) | 2014-09-03 00:25:56 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-09-03 00:25:56 +0100 |
commit | ac866a1c46583e50e74aefad0a1bc6de720a7211 (patch) | |
tree | 554751e686dec32987c229022c07ae09de1a9f28 | |
parent | Fix recent regression from 473c5594 where camera started to judder on moving ... (diff) | |
download | opensim-SC_OLD-ac866a1c46583e50e74aefad0a1bc6de720a7211.zip opensim-SC_OLD-ac866a1c46583e50e74aefad0a1bc6de720a7211.tar.gz opensim-SC_OLD-ac866a1c46583e50e74aefad0a1bc6de720a7211.tar.bz2 opensim-SC_OLD-ac866a1c46583e50e74aefad0a1bc6de720a7211.tar.xz |
Add [EntityTransfer] AllowAvatarCrossing setting to determine whether avatars are allowed to cross regions at all.
Defaults to true. For test purposes.
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 17 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 3 |
3 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 18376c3..5f0dbd7 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -224,6 +224,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
224 | public bool m_clampPrimSize; | 224 | public bool m_clampPrimSize; |
225 | public bool m_trustBinaries; | 225 | public bool m_trustBinaries; |
226 | public bool m_allowScriptCrossings = true; | 226 | public bool m_allowScriptCrossings = true; |
227 | |||
228 | /// <summary> | ||
229 | /// Can avatars cross from and to this region? | ||
230 | /// </summary> | ||
231 | public bool AllowAvatarCrossing { get; set; } | ||
232 | |||
227 | public bool m_useFlySlow; | 233 | public bool m_useFlySlow; |
228 | public bool m_useTrashOnDelete = true; | 234 | public bool m_useTrashOnDelete = true; |
229 | 235 | ||
@@ -1023,6 +1029,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1023 | 1029 | ||
1024 | #endregion Region Config | 1030 | #endregion Region Config |
1025 | 1031 | ||
1032 | IConfig entityTransferConfig = m_config.Configs["EntityTransfer"]; | ||
1033 | if (entityTransferConfig != null) | ||
1034 | { | ||
1035 | AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing); | ||
1036 | } | ||
1037 | |||
1026 | #region Interest Management | 1038 | #region Interest Management |
1027 | 1039 | ||
1028 | IConfig interestConfig = m_config.Configs["InterestManagement"]; | 1040 | IConfig interestConfig = m_config.Configs["InterestManagement"]; |
@@ -1091,6 +1103,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1091 | CollidablePrims = true; | 1103 | CollidablePrims = true; |
1092 | PhysicsEnabled = true; | 1104 | PhysicsEnabled = true; |
1093 | 1105 | ||
1106 | AllowAvatarCrossing = true; | ||
1107 | |||
1094 | PeriodicBackup = true; | 1108 | PeriodicBackup = true; |
1095 | UseBackup = true; | 1109 | UseBackup = true; |
1096 | 1110 | ||
@@ -5613,6 +5627,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
5613 | return true; | 5627 | return true; |
5614 | } | 5628 | } |
5615 | 5629 | ||
5630 | if (!AllowAvatarCrossing && !viaTeleport) | ||
5631 | return false; | ||
5632 | |||
5616 | // FIXME: Root agent count is currently known to be inaccurate. This forces a recount before we check. | 5633 | // FIXME: Root agent count is currently known to be inaccurate. This forces a recount before we check. |
5617 | // However, the long term fix is to make sure root agent count is always accurate. | 5634 | // However, the long term fix is to make sure root agent count is always accurate. |
5618 | m_sceneGraph.RecalculateStats(); | 5635 | m_sceneGraph.RecalculateStats(); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f2a636a..3c37de8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3226,7 +3226,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3226 | m_lastVelocity = Velocity; | 3226 | m_lastVelocity = Velocity; |
3227 | } | 3227 | } |
3228 | 3228 | ||
3229 | CheckForBorderCrossing(); | 3229 | if (Scene.AllowAvatarCrossing) |
3230 | CheckForBorderCrossing(); | ||
3230 | 3231 | ||
3231 | CheckForSignificantMovement(); // sends update to the modules. | 3232 | CheckForSignificantMovement(); // sends update to the modules. |
3232 | } | 3233 | } |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 348aaa2..dce01eb 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -711,6 +711,9 @@ | |||
711 | ; | 711 | ; |
712 | max_distance = 65535 | 712 | max_distance = 65535 |
713 | 713 | ||
714 | ; Allow avatars to cross into and out of the region. | ||
715 | AllowAvatarCrossing = true | ||
716 | |||
714 | ; Minimum user level required for HyperGrid teleports | 717 | ; Minimum user level required for HyperGrid teleports |
715 | LevelHGTeleport = 0 | 718 | LevelHGTeleport = 0 |
716 | 719 | ||