diff options
Diffstat (limited to '')
3 files changed, 84 insertions, 66 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs index 9ef3e10..15141e5 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs | |||
@@ -37,7 +37,7 @@ using OpenSim.Region.Environment.Scenes; | |||
37 | 37 | ||
38 | namespace OpenSim.Region.Environment.Modules.World.Estate | 38 | namespace OpenSim.Region.Environment.Modules.World.Estate |
39 | { | 39 | { |
40 | public class EstateManagementModule : IRegionModule | 40 | public class EstateManagementModule : IEstateModule |
41 | { | 41 | { |
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
@@ -57,50 +57,46 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
57 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, | 57 | private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor, |
58 | int matureLevel, bool restrictPushObject, bool allowParcelChanges) | 58 | int matureLevel, bool restrictPushObject, bool allowParcelChanges) |
59 | { | 59 | { |
60 | m_scene.RegionInfo.EstateSettings.regionFlags = Simulator.RegionFlags.None; | ||
61 | |||
62 | if (blockTerraform) | 60 | if (blockTerraform) |
63 | { | 61 | m_scene.RegionInfo.RegionSettings.BlockTerraform = true; |
64 | m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags | | 62 | else |
65 | Simulator.RegionFlags.BlockTerraform; | 63 | m_scene.RegionInfo.RegionSettings.BlockTerraform = false; |
66 | } | ||
67 | 64 | ||
68 | if (noFly) | 65 | if (noFly) |
69 | { | 66 | m_scene.RegionInfo.RegionSettings.BlockFly = true; |
70 | m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags | | 67 | else |
71 | Simulator.RegionFlags.NoFly; | 68 | m_scene.RegionInfo.RegionSettings.BlockFly = false; |
72 | } | ||
73 | 69 | ||
74 | if (allowDamage) | 70 | if (allowDamage) |
75 | { | 71 | m_scene.RegionInfo.RegionSettings.AllowDamage = true; |
76 | m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags | | 72 | else |
77 | Simulator.RegionFlags.AllowDamage; | 73 | m_scene.RegionInfo.RegionSettings.AllowDamage = false; |
78 | } | ||
79 | 74 | ||
80 | if (blockLandResell) | 75 | if (blockLandResell) |
81 | { | 76 | m_scene.RegionInfo.RegionSettings.AllowLandResell = false; |
82 | m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags | | 77 | else |
83 | Simulator.RegionFlags.BlockLandResell; | 78 | m_scene.RegionInfo.RegionSettings.AllowLandResell = true; |
84 | } | ||
85 | |||
86 | m_scene.RegionInfo.EstateSettings.maxAgents = (byte) maxAgents; | ||
87 | 79 | ||
88 | m_scene.RegionInfo.EstateSettings.objectBonusFactor = objectBonusFactor; | 80 | m_scene.RegionInfo.RegionSettings.AgentLimit = (byte) maxAgents; |
89 | 81 | ||
90 | m_scene.RegionInfo.EstateSettings.simAccess = (Simulator.SimAccess) matureLevel; | 82 | m_scene.RegionInfo.RegionSettings.ObjectBonus = objectBonusFactor; |
91 | 83 | ||
84 | if(matureLevel <= 13) | ||
85 | m_scene.RegionInfo.RegionSettings.Maturity = 0; | ||
86 | else | ||
87 | m_scene.RegionInfo.RegionSettings.Maturity = 1; | ||
92 | 88 | ||
93 | if (restrictPushObject) | 89 | if (restrictPushObject) |
94 | { | 90 | m_scene.RegionInfo.RegionSettings.RestrictPushing = true; |
95 | m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags | | 91 | else |
96 | Simulator.RegionFlags.RestrictPushObject; | 92 | m_scene.RegionInfo.RegionSettings.RestrictPushing = false; |
97 | } | ||
98 | 93 | ||
99 | if (allowParcelChanges) | 94 | if (allowParcelChanges) |
100 | { | 95 | m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = true; |
101 | m_scene.RegionInfo.EstateSettings.regionFlags = m_scene.RegionInfo.EstateSettings.regionFlags | | 96 | else |
102 | Simulator.RegionFlags.AllowParcelChanges; | 97 | m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide = false; |
103 | } | 98 | |
99 | m_scene.RegionInfo.RegionSettings.Save(); | ||
104 | 100 | ||
105 | sendRegionInfoPacketToAll(); | 101 | sendRegionInfoPacketToAll(); |
106 | } | 102 | } |
@@ -175,19 +171,20 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
175 | bool UseFixedSun, float SunHour) | 171 | bool UseFixedSun, float SunHour) |
176 | { | 172 | { |
177 | // Water Height | 173 | // Water Height |
178 | m_scene.RegionInfo.EstateSettings.waterHeight = WaterHeight; | 174 | m_scene.RegionInfo.RegionSettings.WaterHeight = WaterHeight; |
179 | 175 | ||
180 | // Terraforming limits | 176 | // Terraforming limits |
181 | m_scene.RegionInfo.EstateSettings.terrainRaiseLimit = TerrainRaiseLimit; | 177 | m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit = TerrainRaiseLimit; |
182 | m_scene.RegionInfo.EstateSettings.terrainLowerLimit = TerrainLowerLimit; | 178 | m_scene.RegionInfo.RegionSettings.TerrainLowerLimit = TerrainLowerLimit; |
183 | 179 | ||
184 | // Time of day / fixed sun | 180 | // Time of day / fixed sun |
185 | m_scene.RegionInfo.EstateSettings.useFixedSun = UseFixedSun; | 181 | m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; |
186 | m_scene.RegionInfo.EstateSettings.sunHour = SunHour; | 182 | m_scene.RegionInfo.EstateSettings.sunHour = SunHour; |
187 | m_scene.EventManager.TriggerEstateToolsTimeUpdate(m_scene.RegionInfo.RegionHandle, UseFixedSun, UseFixedSun, SunHour); | 183 | m_scene.EventManager.TriggerEstateToolsTimeUpdate(m_scene.RegionInfo.RegionHandle, UseFixedSun, UseFixedSun, SunHour); |
188 | //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); | 184 | //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); |
189 | //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); | 185 | //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); |
190 | sendRegionInfoPacketToAll(); | 186 | sendRegionInfoPacketToAll(); |
187 | m_scene.RegionInfo.RegionSettings.Save(); | ||
191 | } | 188 | } |
192 | 189 | ||
193 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) | 190 | private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds) |
@@ -339,23 +336,22 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
339 | private void handleEstateDebugRegionRequest(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics) | 336 | private void handleEstateDebugRegionRequest(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics) |
340 | { | 337 | { |
341 | if (physics) | 338 | if (physics) |
342 | { | 339 | m_scene.RegionInfo.RegionSettings.DisablePhysics = true; |
343 | m_scene.RegionInfo.EstateSettings.regionFlags |= Simulator.RegionFlags.SkipPhysics; | ||
344 | } | ||
345 | else | 340 | else |
346 | { | 341 | m_scene.RegionInfo.RegionSettings.DisablePhysics = false; |
347 | m_scene.RegionInfo.EstateSettings.regionFlags &= ~Simulator.RegionFlags.SkipPhysics; | ||
348 | } | ||
349 | 342 | ||
350 | if (scripted) | 343 | if (scripted) |
351 | { | 344 | m_scene.RegionInfo.RegionSettings.DisableScripts = true; |
352 | m_scene.RegionInfo.EstateSettings.regionFlags |= Simulator.RegionFlags.SkipScripts; | ||
353 | } | ||
354 | else | 345 | else |
355 | { | 346 | m_scene.RegionInfo.RegionSettings.DisableScripts = false; |
356 | m_scene.RegionInfo.EstateSettings.regionFlags &= ~Simulator.RegionFlags.SkipScripts; | 347 | |
357 | } | 348 | if (collisionEvents) |
349 | m_scene.RegionInfo.RegionSettings.DisableCollisions = true; | ||
350 | else | ||
351 | m_scene.RegionInfo.RegionSettings.DisableCollisions = false; | ||
352 | |||
358 | 353 | ||
354 | m_scene.RegionInfo.RegionSettings.Save(); | ||
359 | 355 | ||
360 | m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics); | 356 | m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics); |
361 | } | 357 | } |
@@ -378,24 +374,27 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
378 | RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs(); | 374 | RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs(); |
379 | args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor; | 375 | args.billableFactor = m_scene.RegionInfo.EstateSettings.billableFactor; |
380 | args.estateID = m_scene.RegionInfo.EstateSettings.estateID; | 376 | args.estateID = m_scene.RegionInfo.EstateSettings.estateID; |
381 | args.maxAgents = m_scene.RegionInfo.EstateSettings.maxAgents; | 377 | args.maxAgents = (byte)m_scene.RegionInfo.RegionSettings.AgentLimit; |
382 | args.objectBonusFactor = m_scene.RegionInfo.EstateSettings.objectBonusFactor; | 378 | args.objectBonusFactor = (float)m_scene.RegionInfo.RegionSettings.ObjectBonus; |
383 | args.parentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID; | 379 | args.parentEstateID = m_scene.RegionInfo.EstateSettings.parentEstateID; |
384 | args.pricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter; | 380 | args.pricePerMeter = m_scene.RegionInfo.EstateSettings.pricePerMeter; |
385 | args.redirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX; | 381 | args.redirectGridX = m_scene.RegionInfo.EstateSettings.redirectGridX; |
386 | args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY; | 382 | args.redirectGridY = m_scene.RegionInfo.EstateSettings.redirectGridY; |
387 | args.regionFlags = (uint)(m_scene.RegionInfo.EstateSettings.regionFlags); | 383 | args.regionFlags = GetRegionFlags(); |
388 | args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess; | 384 | byte mature = 13; |
385 | if(m_scene.RegionInfo.RegionSettings.Maturity == 1) | ||
386 | mature = 21; | ||
387 | args.simAccess = mature; | ||
389 | 388 | ||
390 | if (m_scene.RegionInfo.EstateSettings.useFixedSun) | 389 | if (m_scene.RegionInfo.RegionSettings.FixedSun) |
391 | args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour; | 390 | args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour; |
392 | else | 391 | else |
393 | args.sunHour = m_scene.EventManager.GetSunLindenHour(); | 392 | args.sunHour = m_scene.EventManager.GetSunLindenHour(); |
394 | 393 | ||
395 | args.terrainLowerLimit = m_scene.RegionInfo.EstateSettings.terrainLowerLimit; | 394 | args.terrainLowerLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit; |
396 | args.terrainRaiseLimit = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit; | 395 | args.terrainRaiseLimit = (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit; |
397 | args.useEstateSun = !m_scene.RegionInfo.EstateSettings.useFixedSun; | 396 | args.useEstateSun = !m_scene.RegionInfo.RegionSettings.FixedSun; |
398 | args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight; | 397 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; |
399 | args.simName = m_scene.RegionInfo.RegionName; | 398 | args.simName = m_scene.RegionInfo.RegionName; |
400 | 399 | ||
401 | 400 | ||
@@ -541,10 +540,13 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
541 | args.terrainStartHeight1 = m_scene.RegionInfo.EstateSettings.terrainStartHeight1; | 540 | args.terrainStartHeight1 = m_scene.RegionInfo.EstateSettings.terrainStartHeight1; |
542 | args.terrainStartHeight2 = m_scene.RegionInfo.EstateSettings.terrainStartHeight2; | 541 | args.terrainStartHeight2 = m_scene.RegionInfo.EstateSettings.terrainStartHeight2; |
543 | args.terrainStartHeight3 = m_scene.RegionInfo.EstateSettings.terrainStartHeight3; | 542 | args.terrainStartHeight3 = m_scene.RegionInfo.EstateSettings.terrainStartHeight3; |
544 | args.simAccess = (byte)m_scene.RegionInfo.EstateSettings.simAccess; | 543 | byte mature = 13; |
545 | args.waterHeight = m_scene.RegionInfo.EstateSettings.waterHeight; | 544 | if(m_scene.RegionInfo.RegionSettings.Maturity == 1) |
545 | mature = 21; | ||
546 | args.simAccess = mature; | ||
547 | args.waterHeight = (float)m_scene.RegionInfo.RegionSettings.WaterHeight; | ||
546 | 548 | ||
547 | args.regionFlags = (uint)m_scene.RegionInfo.EstateSettings.regionFlags; | 549 | args.regionFlags = GetRegionFlags(); |
548 | args.regionName = m_scene.RegionInfo.RegionName; | 550 | args.regionName = m_scene.RegionInfo.RegionName; |
549 | args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 551 | args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
550 | args.terrainBase0 = m_scene.RegionInfo.EstateSettings.terrainBase0; | 552 | args.terrainBase0 = m_scene.RegionInfo.EstateSettings.terrainBase0; |
@@ -573,6 +575,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
573 | public void Initialise(Scene scene, IConfigSource source) | 575 | public void Initialise(Scene scene, IConfigSource source) |
574 | { | 576 | { |
575 | m_scene = scene; | 577 | m_scene = scene; |
578 | m_scene.RegisterModuleInterface<IEstateModule>(this); | ||
576 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; | 579 | m_scene.EventManager.OnNewClient += EventManager_OnNewClient; |
577 | m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; | 580 | m_scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; |
578 | } | 581 | } |
@@ -602,8 +605,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
602 | 605 | ||
603 | public void changeWaterHeight(float height) | 606 | public void changeWaterHeight(float height) |
604 | { | 607 | { |
605 | setRegionTerrainSettings(height, m_scene.RegionInfo.EstateSettings.terrainRaiseLimit, m_scene.RegionInfo.EstateSettings.terrainLowerLimit, | 608 | setRegionTerrainSettings(height, (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit, (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit, |
606 | m_scene.RegionInfo.EstateSettings.useFixedSun, m_scene.RegionInfo.EstateSettings.sunHour); | 609 | m_scene.RegionInfo.RegionSettings.FixedSun, m_scene.RegionInfo.EstateSettings.sunHour); |
607 | sendRegionInfoPacketToAll(); | 610 | sendRegionInfoPacketToAll(); |
608 | } | 611 | } |
609 | 612 | ||
@@ -631,5 +634,12 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
631 | client.OnLandStatRequest += HandleLandStatRequest; | 634 | client.OnLandStatRequest += HandleLandStatRequest; |
632 | sendRegionHandshake(client); | 635 | sendRegionHandshake(client); |
633 | } | 636 | } |
637 | |||
638 | public uint GetRegionFlags() | ||
639 | { | ||
640 | Simulator.RegionFlags flags = Simulator.RegionFlags.None; | ||
641 | //m_scene.RegionInfo.RegionSettings. | ||
642 | return (uint)flags; | ||
643 | } | ||
634 | } | 644 | } |
635 | } | 645 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 2b24435..4a5948f 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
140 | //Normal Calculations | 140 | //Normal Calculations |
141 | return Convert.ToInt32( | 141 | return Convert.ToInt32( |
142 | Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * | 142 | Math.Round((Convert.ToDecimal(landData.area) / Convert.ToDecimal(65536)) * m_scene.objectCapacity * |
143 | Convert.ToDecimal(m_scene.RegionInfo.EstateSettings.objectBonusFactor))); ; | 143 | Convert.ToDecimal(m_scene.RegionInfo.RegionSettings.ObjectBonus))); ; |
144 | } | 144 | } |
145 | } | 145 | } |
146 | public int getSimulatorMaxPrimCount(ILandObject thisObject) | 146 | public int getSimulatorMaxPrimCount(ILandObject thisObject) |
@@ -161,7 +161,15 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
161 | 161 | ||
162 | public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) | 162 | public void sendLandProperties(int sequence_id, bool snap_selection, int request_result, IClientAPI remote_client) |
163 | { | 163 | { |
164 | remote_client.SendLandProperties(remote_client, sequence_id, snap_selection, request_result, landData, m_scene.RegionInfo.EstateSettings.objectBonusFactor, getParcelMaxPrimCount(this), getSimulatorMaxPrimCount(this), (uint)m_scene.RegionInfo.EstateSettings.regionFlags); | 164 | IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); |
165 | uint regionFlags = 67108864; | ||
166 | if(estateModule != null) | ||
167 | regionFlags = estateModule.GetRegionFlags(); | ||
168 | remote_client.SendLandProperties(remote_client, sequence_id, | ||
169 | snap_selection, request_result, landData, | ||
170 | (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, | ||
171 | getParcelMaxPrimCount(this), | ||
172 | getSimulatorMaxPrimCount(this), regionFlags); | ||
165 | } | 173 | } |
166 | 174 | ||
167 | public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client) | 175 | public void updateLandProperties(LandUpdateArgs args, IClientAPI remote_client) |
@@ -855,4 +863,4 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
855 | 863 | ||
856 | #endregion | 864 | #endregion |
857 | } | 865 | } |
858 | } \ No newline at end of file | 866 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs index f47e6c0..9892794 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs | |||
@@ -541,8 +541,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
541 | private bool LimitChannelChanges(int xStart, int yStart) | 541 | private bool LimitChannelChanges(int xStart, int yStart) |
542 | { | 542 | { |
543 | bool changesLimited = false; | 543 | bool changesLimited = false; |
544 | double minDelta = m_scene.RegionInfo.EstateSettings.terrainLowerLimit; | 544 | double minDelta = m_scene.RegionInfo.RegionSettings.TerrainLowerLimit; |
545 | double maxDelta = m_scene.RegionInfo.EstateSettings.terrainRaiseLimit; | 545 | double maxDelta = m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit; |
546 | 546 | ||
547 | // loop through the height map for this patch and compare it against | 547 | // loop through the height map for this patch and compare it against |
548 | // the revert map | 548 | // the revert map |