aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs37
1 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d3de37d..f86b3b6 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -588,7 +588,42 @@ namespace OpenSim.Region.Framework.Scenes
588 #region Region Settings 588 #region Region Settings
589 589
590 // Load region settings 590 // Load region settings
591 m_regInfo.RegionSettings = simDataService.LoadRegionSettings(m_regInfo.RegionID); 591 // LoadRegionSettings creates new region settings in persistence if they don't already exist for this region.
592 // However, in this case, the default textures are not set in memory properly, so we need to do it here and
593 // resave.
594 // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new
595 // region is set up and avoid these gyrations.
596 RegionSettings rs = simDataService.LoadRegionSettings(m_regInfo.RegionID);
597 bool updatedTerrainTextures = false;
598 if (rs.TerrainTexture1 == UUID.Zero)
599 {
600 rs.TerrainTexture1 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_1;
601 updatedTerrainTextures = true;
602 }
603
604 if (rs.TerrainTexture2 == UUID.Zero)
605 {
606 rs.TerrainTexture2 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_2;
607 updatedTerrainTextures = true;
608 }
609
610 if (rs.TerrainTexture3 == UUID.Zero)
611 {
612 rs.TerrainTexture3 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_3;
613 updatedTerrainTextures = true;
614 }
615
616 if (rs.TerrainTexture4 == UUID.Zero)
617 {
618 rs.TerrainTexture4 = RegionSettings.DEFAULT_TERRAIN_TEXTURE_4;
619 updatedTerrainTextures = true;
620 }
621
622 if (updatedTerrainTextures)
623 rs.Save();
624
625 m_regInfo.RegionSettings = rs;
626
592 if (estateDataService != null) 627 if (estateDataService != null)
593 m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false); 628 m_regInfo.EstateSettings = estateDataService.LoadEstateSettings(m_regInfo.RegionID, false);
594 629