aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2018-07-21 18:31:58 +0100
committerUbitUmarov2018-07-21 18:31:58 +0100
commite15fca60d1efcfe32e795e3494e35bdae26111e2 (patch)
tree0f564ff57e615fec156bc262ac704c776844cd8c /OpenSim/Region
parentmantis8341: fix MOD and LS apis configuration read from ossl file (diff)
downloadopensim-SC-e15fca60d1efcfe32e795e3494e35bdae26111e2.zip
opensim-SC-e15fca60d1efcfe32e795e3494e35bdae26111e2.tar.gz
opensim-SC-e15fca60d1efcfe32e795e3494e35bdae26111e2.tar.bz2
opensim-SC-e15fca60d1efcfe32e795e3494e35bdae26111e2.tar.xz
mantis8342: make max ban height above ground configurable per regions instance with ini file option BanLineSafeHeight
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandChannel.cs20
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs2
3 files changed, 34 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
index 5ff063b..993b782 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs
@@ -37,11 +37,9 @@ namespace OpenSim.Region.CoreModules.World.Land
37 { 37 {
38 #region Constants 38 #region Constants
39 39
40 public const float BAN_LINE_SAFETY_HEIGHT = 100;
41 //Land types set with flags in ParcelOverlay. 40 //Land types set with flags in ParcelOverlay.
42 //Only one of these can be used. 41 //Only one of these can be used.
43 42
44
45 //RequestResults (I think these are right, they seem to work): 43 //RequestResults (I think these are right, they seem to work):
46 public const int LAND_RESULT_MULTIPLE = 1; // The request they made contained more than a single peice of land 44 public const int LAND_RESULT_MULTIPLE = 1; // The request they made contained more than a single peice of land
47 public const int LAND_RESULT_SINGLE = 0; // The request they made contained only a single piece of land 45 public const int LAND_RESULT_SINGLE = 0; // The request they made contained only a single piece of land
@@ -77,10 +75,28 @@ namespace OpenSim.Region.CoreModules.World.Land
77 private readonly Scene m_scene; 75 private readonly Scene m_scene;
78 private readonly LandManagementModule m_landManagementModule; 76 private readonly LandManagementModule m_landManagementModule;
79 77
78 private float m_BanLineSafeHeight = 100.0f;
79 public float BanLineSafeHeight
80 {
81 get
82 {
83 return m_BanLineSafeHeight;
84 }
85 private set
86 {
87 if (value >= 20f && value <= 5000f)
88 m_BanLineSafeHeight = value;
89 else
90 m_BanLineSafeHeight = 100.0f;
91 }
92 }
93
80 public LandChannel(Scene scene, LandManagementModule landManagementMod) 94 public LandChannel(Scene scene, LandManagementModule landManagementMod)
81 { 95 {
82 m_scene = scene; 96 m_scene = scene;
83 m_landManagementModule = landManagementMod; 97 m_landManagementModule = landManagementMod;
98 if(landManagementMod != null)
99 m_BanLineSafeHeight = landManagementMod.BanLineSafeHeight;
84 } 100 }
85 101
86 #region ILandChannel Members 102 #region ILandChannel Members
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 09ece7d..19b714e 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -116,6 +116,19 @@ namespace OpenSim.Region.CoreModules.World.Land
116 // "View distance" for sending parcel layer info if asked for from a view point in the region 116 // "View distance" for sending parcel layer info if asked for from a view point in the region
117 private int parcelLayerViewDistance { get; set; } 117 private int parcelLayerViewDistance { get; set; }
118 118
119 private float m_BanLineSafeHeight = 100.0f;
120 public float BanLineSafeHeight
121 {
122 get { return m_BanLineSafeHeight; }
123 private set
124 {
125 if (value > 20f && value <= 5000f)
126 m_BanLineSafeHeight = value;
127 else
128 m_BanLineSafeHeight = 100.0f;
129 }
130 }
131
119 #region INonSharedRegionModule Members 132 #region INonSharedRegionModule Members
120 133
121 public Type ReplaceableInterface 134 public Type ReplaceableInterface
@@ -137,6 +150,7 @@ namespace OpenSim.Region.CoreModules.World.Land
137 bool disablebans = landManagementConfig.GetBoolean("DisableParcelBans", !m_allowedForcefulBans); 150 bool disablebans = landManagementConfig.GetBoolean("DisableParcelBans", !m_allowedForcefulBans);
138 m_allowedForcefulBans = !disablebans; 151 m_allowedForcefulBans = !disablebans;
139 m_showBansLines = landManagementConfig.GetBoolean("ShowParcelBansLines", m_showBansLines); 152 m_showBansLines = landManagementConfig.GetBoolean("ShowParcelBansLines", m_showBansLines);
153 m_BanLineSafeHeight = landManagementConfig.GetFloat("BanLineSafeHeight", m_BanLineSafeHeight);
140 } 154 }
141 } 155 }
142 156
@@ -341,7 +355,7 @@ namespace OpenSim.Region.CoreModules.World.Land
341 public bool EnforceBans(ILandObject land, ScenePresence avatar) 355 public bool EnforceBans(ILandObject land, ScenePresence avatar)
342 { 356 {
343 Vector3 agentpos = avatar.AbsolutePosition; 357 Vector3 agentpos = avatar.AbsolutePosition;
344 float h = m_scene.GetGroundHeight(agentpos.X, agentpos.Y) + LandChannel.BAN_LINE_SAFETY_HEIGHT; 358 float h = m_scene.GetGroundHeight(agentpos.X, agentpos.Y) + m_scene.LandChannel.BanLineSafeHeight;
345 float zdif = avatar.AbsolutePosition.Z - h; 359 float zdif = avatar.AbsolutePosition.Z - h;
346 if (zdif > 0 ) 360 if (zdif > 0 )
347 { 361 {
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index cbe8a2e..229587b 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -633,7 +633,7 @@ namespace OpenSim.Region.CoreModules.World.Land
633 633
634 public bool CanBeOnThisLand(UUID avatar, float posHeight) 634 public bool CanBeOnThisLand(UUID avatar, float posHeight)
635 { 635 {
636 if (posHeight < LandChannel.BAN_LINE_SAFETY_HEIGHT && IsBannedFromLand(avatar)) 636 if (posHeight < m_scene.LandChannel.BanLineSafeHeight && IsBannedFromLand(avatar))
637 { 637 {
638 return false; 638 return false;
639 } 639 }