From 0c3493f61965ab3fcd16217f72ed2ae7a347130c Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Tue, 28 Jan 2014 16:25:01 -0800 Subject: [PATCH] clear land tainting when tested. Then testing, pass scene to LandObject as now needed to get region size --- OpenSim/Framework/TerrainData.cs | 6 +++++- .../CoreModules/World/Archiver/Tests/ArchiverTests.cs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/TerrainData.cs b/OpenSim/Framework/TerrainData.cs index d1e0e7ef91..9325df23d5 100644 --- a/OpenSim/Framework/TerrainData.cs +++ b/OpenSim/Framework/TerrainData.cs @@ -160,7 +160,11 @@ namespace OpenSim.Framework public override bool IsTaintedAt(int xx, int yy) { - return m_taint[xx / Constants.TerrainPatchSize, yy / Constants.TerrainPatchSize]; + int tx = xx / Constants.TerrainPatchSize; + int ty = yy / Constants.TerrainPatchSize; + bool ret = m_taint[tx, ty]; + m_taint[tx, ty] = false; + return ret; } // TerrainData.GetDatabaseBlob diff --git a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs index 53f41f986e..e08a42da9d 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/Tests/ArchiverTests.cs @@ -579,7 +579,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver.Tests ArchiveConstants.CONTROL_FILE_PATH, new ArchiveWriteRequest(m_scene, (Stream)null, Guid.Empty).CreateControlFile(new ArchiveScenesGroup())); - LandObject lo = new LandObject(groupID, true, null); + LandObject lo = new LandObject(groupID, true, m_scene); lo.SetLandBitmap(lo.BasicFullRegionLandBitmap()); LandData ld = lo.LandData; ld.GlobalID = landID;