aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs3
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs2
3 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
index 6ba4c5a..931898c 100644
--- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs
@@ -182,6 +182,9 @@ namespace OpenSim.Framework.Serialization.External
182 case "FixedSun": 182 case "FixedSun":
183 settings.FixedSun = bool.Parse(xtr.ReadElementContentAsString()); 183 settings.FixedSun = bool.Parse(xtr.ReadElementContentAsString());
184 break; 184 break;
185 case "SunPosition":
186 settings.SunPosition = double.Parse(xtr.ReadElementContentAsString());
187 break;
185 } 188 }
186 } 189 }
187 190
@@ -237,8 +240,9 @@ namespace OpenSim.Framework.Serialization.External
237 xtw.WriteElementString("TerrainLowerLimit", settings.TerrainLowerLimit.ToString()); 240 xtw.WriteElementString("TerrainLowerLimit", settings.TerrainLowerLimit.ToString());
238 xtw.WriteElementString("UseEstateSun", settings.UseEstateSun.ToString()); 241 xtw.WriteElementString("UseEstateSun", settings.UseEstateSun.ToString());
239 xtw.WriteElementString("FixedSun", settings.FixedSun.ToString()); 242 xtw.WriteElementString("FixedSun", settings.FixedSun.ToString());
240 // XXX: Need to expose interface to get sun phase information from sun module 243 xtw.WriteElementString("SunPosition", settings.SunPosition.ToString());
241 // xtw.WriteStartElement("SunPhase", 244 // Note: 'SunVector' isn't saved because this value is owned by the Sun Module, which
245 // calculates it automatically according to the date and other factors.
242 xtw.WriteEndElement(); 246 xtw.WriteEndElement();
243 247
244 xtw.WriteEndElement(); 248 xtw.WriteEndElement();
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 6461636..48130e7 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -488,6 +488,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
488 currentRegionSettings.Elevation2SE = loadedRegionSettings.Elevation2SE; 488 currentRegionSettings.Elevation2SE = loadedRegionSettings.Elevation2SE;
489 currentRegionSettings.Elevation2SW = loadedRegionSettings.Elevation2SW; 489 currentRegionSettings.Elevation2SW = loadedRegionSettings.Elevation2SW;
490 currentRegionSettings.FixedSun = loadedRegionSettings.FixedSun; 490 currentRegionSettings.FixedSun = loadedRegionSettings.FixedSun;
491 currentRegionSettings.SunPosition = loadedRegionSettings.SunPosition;
491 currentRegionSettings.ObjectBonus = loadedRegionSettings.ObjectBonus; 492 currentRegionSettings.ObjectBonus = loadedRegionSettings.ObjectBonus;
492 currentRegionSettings.RestrictPushing = loadedRegionSettings.RestrictPushing; 493 currentRegionSettings.RestrictPushing = loadedRegionSettings.RestrictPushing;
493 currentRegionSettings.TerrainLowerLimit = loadedRegionSettings.TerrainLowerLimit; 494 currentRegionSettings.TerrainLowerLimit = loadedRegionSettings.TerrainLowerLimit;
@@ -500,6 +501,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
500 currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight; 501 currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight;
501 502
502 currentRegionSettings.Save(); 503 currentRegionSettings.Save();
504
505 m_scene.TriggerEstateSunUpdate();
503 506
504 IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); 507 IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
505 508
diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
index 34e2e23..6ba3459 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs
@@ -440,6 +440,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
440 rs.Elevation2SE = 9.2; 440 rs.Elevation2SE = 9.2;
441 rs.Elevation2SW = 2.1; 441 rs.Elevation2SW = 2.1;
442 rs.FixedSun = true; 442 rs.FixedSun = true;
443 rs.SunPosition = 12.0;
443 rs.ObjectBonus = 1.4; 444 rs.ObjectBonus = 1.4;
444 rs.RestrictPushing = true; 445 rs.RestrictPushing = true;
445 rs.TerrainLowerLimit = 0.4; 446 rs.TerrainLowerLimit = 0.4;
@@ -485,6 +486,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests
485 Assert.That(loadedRs.Elevation2SE, Is.EqualTo(9.2)); 486 Assert.That(loadedRs.Elevation2SE, Is.EqualTo(9.2));
486 Assert.That(loadedRs.Elevation2SW, Is.EqualTo(2.1)); 487 Assert.That(loadedRs.Elevation2SW, Is.EqualTo(2.1));
487 Assert.That(loadedRs.FixedSun, Is.True); 488 Assert.That(loadedRs.FixedSun, Is.True);
489 Assert.AreEqual(12.0, loadedRs.SunPosition);
488 Assert.That(loadedRs.ObjectBonus, Is.EqualTo(1.4)); 490 Assert.That(loadedRs.ObjectBonus, Is.EqualTo(1.4));
489 Assert.That(loadedRs.RestrictPushing, Is.True); 491 Assert.That(loadedRs.RestrictPushing, Is.True);
490 Assert.That(loadedRs.TerrainLowerLimit, Is.EqualTo(0.4)); 492 Assert.That(loadedRs.TerrainLowerLimit, Is.EqualTo(0.4));