aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMelanie Thielker2008-07-14 01:39:36 +0000
committerMelanie Thielker2008-07-14 01:39:36 +0000
commit07bd749ac56dc498610fc88e61cc7ab04047620e (patch)
tree7e1e8f017f1abe0f3dcc21c29bbae7bafb4b456f /OpenSim/Region/Environment
parentPatch #9149 (diff)
downloadopensim-SC-07bd749ac56dc498610fc88e61cc7ab04047620e.zip
opensim-SC-07bd749ac56dc498610fc88e61cc7ab04047620e.tar.gz
opensim-SC-07bd749ac56dc498610fc88e61cc7ab04047620e.tar.bz2
opensim-SC-07bd749ac56dc498610fc88e61cc7ab04047620e.tar.xz
Patch #9150
Patch 7 of the region patches. Finish off the region parts of the estate dialog. Full user functionality. Terrain textures, heights, water, avatar counts, prim bonus, debug settings and region toggles can now be set from the dialog on a per-region basis. Estate stuff defaults to sane values where there are no defaults, to estate_settings.xml otherwise. Sun still b0rked :(
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs81
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
3 files changed, 82 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index 55896d4..ac6a075 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -118,6 +118,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
118 m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture; 118 m_scene.RegionInfo.RegionSettings.TerrainTexture4 = texture;
119 break; 119 break;
120 } 120 }
121 m_scene.RegionInfo.RegionSettings.Save();
121 } 122 }
122 123
123 public void setEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue) 124 public void setEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue)
@@ -141,6 +142,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
141 m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue; 142 m_scene.RegionInfo.RegionSettings.Elevation2NE = highValue;
142 break; 143 break;
143 } 144 }
145 m_scene.RegionInfo.RegionSettings.Save();
144 } 146 }
145 147
146 private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient) 148 private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient)
@@ -160,10 +162,13 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
160 162
161 // Time of day / fixed sun 163 // Time of day / fixed sun
162 m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; 164 m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
163 m_scene.RegionInfo.EstateSettings.sunHour = SunHour; 165 m_scene.RegionInfo.RegionSettings.SunPosition = SunHour;
166
164 m_scene.EventManager.TriggerEstateToolsTimeUpdate(m_scene.RegionInfo.RegionHandle, UseFixedSun, UseFixedSun, SunHour); 167 m_scene.EventManager.TriggerEstateToolsTimeUpdate(m_scene.RegionInfo.RegionHandle, UseFixedSun, UseFixedSun, SunHour);
168
165 //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); 169 //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
166 //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); 170 //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString());
171
167 sendRegionInfoPacketToAll(); 172 sendRegionInfoPacketToAll();
168 m_scene.RegionInfo.RegionSettings.Save(); 173 m_scene.RegionInfo.RegionSettings.Save();
169 } 174 }
@@ -368,7 +373,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
368 args.simAccess = mature; 373 args.simAccess = mature;
369 374
370 if (m_scene.RegionInfo.RegionSettings.FixedSun) 375 if (m_scene.RegionInfo.RegionSettings.FixedSun)
371 args.sunHour = m_scene.RegionInfo.EstateSettings.sunHour; 376 args.sunHour = (float)m_scene.RegionInfo.RegionSettings.SunPosition;
372 else 377 else
373 args.sunHour = m_scene.EventManager.GetSunLindenHour(); 378 args.sunHour = m_scene.EventManager.GetSunLindenHour();
374 379
@@ -586,8 +591,12 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
586 591
587 public void changeWaterHeight(float height) 592 public void changeWaterHeight(float height)
588 { 593 {
589 setRegionTerrainSettings(height, (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit, (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit, 594 setRegionTerrainSettings(height,
590 m_scene.RegionInfo.RegionSettings.FixedSun, m_scene.RegionInfo.EstateSettings.sunHour); 595 (float)m_scene.RegionInfo.RegionSettings.TerrainRaiseLimit,
596 (float)m_scene.RegionInfo.RegionSettings.TerrainLowerLimit,
597 m_scene.RegionInfo.RegionSettings.FixedSun,
598 (float)m_scene.RegionInfo.RegionSettings.SunPosition);
599
591 sendRegionInfoPacketToAll(); 600 sendRegionInfoPacketToAll();
592 } 601 }
593 602
@@ -597,7 +606,8 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
597 { 606 {
598 client.OnDetailedEstateDataRequest += sendDetailedEstateData; 607 client.OnDetailedEstateDataRequest += sendDetailedEstateData;
599 client.OnSetEstateFlagsRequest += estateSetRegionInfoHandler; 608 client.OnSetEstateFlagsRequest += estateSetRegionInfoHandler;
600 client.OnSetEstateTerrainBaseTexture += setEstateTerrainBaseTexture; 609// client.OnSetEstateTerrainBaseTexture += setEstateTerrainBaseTexture;
610 client.OnSetEstateTerrainDetailTexture += setEstateTerrainBaseTexture;
601 client.OnSetEstateTerrainTextureHeights += setEstateTerrainTextureHeights; 611 client.OnSetEstateTerrainTextureHeights += setEstateTerrainTextureHeights;
602 client.OnCommitEstateTerrainTextureRequest += handleCommitEstateTerrainTextureRequest; 612 client.OnCommitEstateTerrainTextureRequest += handleCommitEstateTerrainTextureRequest;
603 client.OnSetRegionTerrainSettings += setRegionTerrainSettings; 613 client.OnSetRegionTerrainSettings += setRegionTerrainSettings;
@@ -618,7 +628,66 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
618 public uint GetRegionFlags() 628 public uint GetRegionFlags()
619 { 629 {
620 Simulator.RegionFlags flags = Simulator.RegionFlags.None; 630 Simulator.RegionFlags flags = Simulator.RegionFlags.None;
621 //m_scene.RegionInfo.RegionSettings. 631
632 // Fully implemented
633 //
634 if(m_scene.RegionInfo.RegionSettings.AllowDamage)
635 flags |= Simulator.RegionFlags.AllowDamage;
636 if(m_scene.RegionInfo.RegionSettings.BlockTerraform)
637 flags |= Simulator.RegionFlags.BlockTerraform;
638 if(!m_scene.RegionInfo.RegionSettings.AllowLandResell)
639 flags |= Simulator.RegionFlags.BlockLandResell;
640 if(m_scene.RegionInfo.RegionSettings.DisableCollisions)
641 flags |= Simulator.RegionFlags.SkipCollisions;
642 if(m_scene.RegionInfo.RegionSettings.DisableScripts)
643 flags |= Simulator.RegionFlags.SkipScripts;
644 if(m_scene.RegionInfo.RegionSettings.DisablePhysics)
645 flags |= Simulator.RegionFlags.SkipPhysics;
646 if(m_scene.RegionInfo.RegionSettings.BlockFly)
647 flags |= Simulator.RegionFlags.NoFly;
648 if(m_scene.RegionInfo.RegionSettings.RestrictPushing)
649 flags |= Simulator.RegionFlags.RestrictPushObject;
650 if(m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
651 flags |= Simulator.RegionFlags.AllowParcelChanges;
652 if(m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
653 flags |= (Simulator.RegionFlags)(1 << 29);
654
655 // Partially implemented
656 //
657 if(m_scene.RegionInfo.RegionSettings.FixedSun)
658 flags |= Simulator.RegionFlags.SunFixed;
659
660 // Not implemented
661 //
662 // TODO: ExternallyVisible
663 flags |= Simulator.RegionFlags.ExternallyVisible;
664 // TODO: PublicAllowed
665 flags |= Simulator.RegionFlags.PublicAllowed;
666 // TODO: AllowDirectTeleport
667 flags |= Simulator.RegionFlags.AllowDirectTeleport;
668 // TODO: AllowVoice
669 flags |= Simulator.RegionFlags.AllowVoice;
670
671 // TDOD: AllowLandmark
672 // TDOD: AllowSetHome
673 // TODO: ResetHomeOnTeleport
674 // TODO: TaxFree ? (Linden-ism)
675 // TODO: Sandbox ?
676 // TODO: SkipUpdateInterestList
677 // TODO: ExternallyVisible
678 // TODO: DenyAnonymous
679 // TODO: DenyIdentified
680 // TODO: DenyTransacted
681 // TODO: AbuseEmailToEstateOwner
682 // TODO: BlockDwell
683 // TODO: EstateSkipScripts
684
685 // Omitted
686 //
687 // Omitted: NullLayer (what is that?)
688 // Omitted: SkipAgentAction (what does it do?)
689 // Omitted: MainlandVisible (Do we need it)
690
622 return (uint)flags; 691 return (uint)flags;
623 } 692 }
624 } 693 }
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index f73c193..5682de3 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -301,7 +301,7 @@ namespace OpenSim.Region.Environment.Modules
301 } 301 }
302 302
303 // set estate settings for region access to sun position 303 // set estate settings for region access to sun position
304 m_scene.RegionInfo.EstateSettings.sunPosition = Position; 304 m_scene.RegionInfo.RegionSettings.SunVector = Position;
305 //m_scene.RegionInfo.EstateSettings.sunHour = GetLindenEstateHourFromCurrentTime(); 305 //m_scene.RegionInfo.EstateSettings.sunHour = GetLindenEstateHourFromCurrentTime();
306 } 306 }
307 public void ForceSunUpdateToAllClients() 307 public void ForceSunUpdateToAllClients()
@@ -316,8 +316,8 @@ namespace OpenSim.Region.Environment.Modules
316 } 316 }
317 317
318 // set estate settings for region access to sun position 318 // set estate settings for region access to sun position
319 m_scene.RegionInfo.EstateSettings.sunPosition = Position; 319 m_scene.RegionInfo.RegionSettings.SunVector = Position;
320 m_scene.RegionInfo.EstateSettings.sunHour = GetLindenEstateHourFromCurrentTime(); 320 m_scene.RegionInfo.RegionSettings.SunPosition = GetLindenEstateHourFromCurrentTime();
321 } 321 }
322 /// <summary> 322 /// <summary>
323 /// Calculate the sun's orbital position and its velocity. 323 /// Calculate the sun's orbital position and its velocity.
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 36a0ffc..a6a5264 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1354,10 +1354,10 @@ namespace OpenSim.Region.Environment.Scenes
1354 m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID"); 1354 m_log.Warn("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID");
1355 } 1355 }
1356 1356
1357 m_regInfo.EstateSettings.terrainImageID = TerrainImageLLUUID; 1357 m_regInfo.RegionSettings.TerrainImageID = TerrainImageLLUUID;
1358 1358
1359 AssetBase asset = new AssetBase(); 1359 AssetBase asset = new AssetBase();
1360 asset.FullID = m_regInfo.EstateSettings.terrainImageID; 1360 asset.FullID = m_regInfo.RegionSettings.TerrainImageID;
1361 asset.Data = data; 1361 asset.Data = data;
1362 asset.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); 1362 asset.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString();
1363 asset.Description = RegionInfo.RegionName; 1363 asset.Description = RegionInfo.RegionName;
@@ -1405,10 +1405,10 @@ namespace OpenSim.Region.Environment.Scenes
1405 TerrainImageLLUUID = lastMapRegionUUID; 1405 TerrainImageLLUUID = lastMapRegionUUID;
1406 } 1406 }
1407 1407
1408 m_regInfo.EstateSettings.terrainImageID = TerrainImageLLUUID; 1408 m_regInfo.RegionSettings.TerrainImageID = TerrainImageLLUUID;
1409 1409
1410 AssetBase asset = new AssetBase(); 1410 AssetBase asset = new AssetBase();
1411 asset.FullID = m_regInfo.EstateSettings.terrainImageID; 1411 asset.FullID = m_regInfo.RegionSettings.TerrainImageID;
1412 asset.Data = data; 1412 asset.Data = data;
1413 asset.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(); 1413 asset.Name = "terrainImage_" + m_regInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString();
1414 asset.Description = RegionInfo.RegionName; 1414 asset.Description = RegionInfo.RegionName;