From 64d868fb64329b1c961dc8f520c71789bc146609 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 12 May 2011 14:42:28 +0300 Subject: When loading an OAR that doesn't have parcels, create a default parcel --- OpenSim/Tests/Common/Mock/TestLandChannel.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'OpenSim/Tests/Common') diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs index c3134b3..0e4dfb9 100644 --- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs +++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs @@ -40,10 +40,12 @@ namespace OpenSim.Tests.Common.Mock public class TestLandChannel : ILandChannel { private Scene m_scene; + private List m_parcels; public TestLandChannel(Scene scene) { m_scene = scene; + m_parcels = new List(); } public List ParcelsNearPoint(Vector3 position) @@ -53,12 +55,19 @@ namespace OpenSim.Tests.Common.Mock public List AllParcels() { - return new List(); + return m_parcels; } public void Clear(bool setupDefaultParcel) { - // Intentionally blank since we don't save any parcel data in the test channel + m_parcels.Clear(); + + if (setupDefaultParcel) + { + ILandObject obj = new LandObject(UUID.Zero, false, m_scene); + obj.LandData.Name = "Your Parcel"; + m_parcels.Add(obj); + } } protected ILandObject GetNoLand() -- cgit v1.1