From 8d3a8a0a8150e856103a152228b736ab74f821d7 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 9 Jun 2011 16:51:47 -0700 Subject: The map breakage is actually at 2048! --- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 30cf1db..69d3005 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -209,16 +209,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap // path, param, agentID.ToString()); // There is a major hack going on in this method. The viewer doesn't request - // map blocks (RequestMapBlocks) above 4096. That means that if we don't hack, + // map blocks (RequestMapBlocks) above 2048. That means that if we don't hack, // grids above that cell don't have a map at all. So, here's the hack: we wait // for this CAP request to come, and we inject the map blocks at this point. // In a normal scenario, this request simply sends back the MapLayer (the blue color). // In the hacked scenario, it also sends the map blocks via UDP. // - // 6/8/2011 -- I'm adding an explicit 4096 check, so that we never forget that there is + // 6/8/2011 -- I'm adding an explicit 2048 check, so that we never forget that there is // a hack here, and so that regions below 4096 don't get spammed with unnecessary map blocks. - if (m_scene.RegionInfo.RegionLocX >= 4096 || m_scene.RegionInfo.RegionLocY >= 4096) + if (m_scene.RegionInfo.RegionLocX >= 2048 || m_scene.RegionInfo.RegionLocY >= 2048) { ScenePresence avatarPresence = null; -- cgit v1.1 From 804fe2d9b00e7e974600f17d64375fab8676ad11 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Fri, 20 May 2011 12:52:09 +0300 Subject: Save the sun's position in OARs --- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 3 +++ OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs | 2 ++ 2 files changed, 5 insertions(+) (limited to 'OpenSim/Region/CoreModules/World') 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 currentRegionSettings.Elevation2SE = loadedRegionSettings.Elevation2SE; currentRegionSettings.Elevation2SW = loadedRegionSettings.Elevation2SW; currentRegionSettings.FixedSun = loadedRegionSettings.FixedSun; + currentRegionSettings.SunPosition = loadedRegionSettings.SunPosition; currentRegionSettings.ObjectBonus = loadedRegionSettings.ObjectBonus; currentRegionSettings.RestrictPushing = loadedRegionSettings.RestrictPushing; currentRegionSettings.TerrainLowerLimit = loadedRegionSettings.TerrainLowerLimit; @@ -500,6 +501,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight; currentRegionSettings.Save(); + + m_scene.TriggerEstateSunUpdate(); IEstateModule estateModule = m_scene.RequestModuleInterface(); 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 rs.Elevation2SE = 9.2; rs.Elevation2SW = 2.1; rs.FixedSun = true; + rs.SunPosition = 12.0; rs.ObjectBonus = 1.4; rs.RestrictPushing = true; rs.TerrainLowerLimit = 0.4; @@ -485,6 +486,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests Assert.That(loadedRs.Elevation2SE, Is.EqualTo(9.2)); Assert.That(loadedRs.Elevation2SW, Is.EqualTo(2.1)); Assert.That(loadedRs.FixedSun, Is.True); + Assert.AreEqual(12.0, loadedRs.SunPosition); Assert.That(loadedRs.ObjectBonus, Is.EqualTo(1.4)); Assert.That(loadedRs.RestrictPushing, Is.True); Assert.That(loadedRs.TerrainLowerLimit, Is.EqualTo(0.4)); -- cgit v1.1 From 487cb51f69ac2f713797de03eb26a4b53afcfade Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 10 Jun 2011 17:22:17 -0700 Subject: 3rd way of reseting the HG Map. This time, don't use the grid service; instead keep track of which map blocks each client has seen in the region, and reset exactly those when the client closes. --- OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 69d3005..3553c9a 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs @@ -845,7 +845,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap } } - protected virtual void GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) + protected virtual List GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag) { List mapBlocks = new List(); List regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, @@ -860,6 +860,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap mapBlocks.Add(block); } remoteClient.SendMapBlock(mapBlocks, 0); + + return mapBlocks; } protected void MapBlockFromGridRegion(MapBlockData block, GridRegion r) -- cgit v1.1