diff options
author | Justin Clarke Casey | 2008-11-19 20:13:51 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-19 20:13:51 +0000 |
commit | 14f3ac144060491761a57137b99173e65252d806 (patch) | |
tree | b958133886407fbd551376671a56f8d757c49579 /OpenSim | |
parent | Guard against a strange nullref in ODE (diff) | |
download | opensim-SC_OLD-14f3ac144060491761a57137b99173e65252d806.zip opensim-SC_OLD-14f3ac144060491761a57137b99173e65252d806.tar.gz opensim-SC_OLD-14f3ac144060491761a57137b99173e65252d806.tar.bz2 opensim-SC_OLD-14f3ac144060491761a57137b99173e65252d806.tar.xz |
* Add just enough to allow the scene presences test to establish a new user connection (though not yet an actual ScenePresence)
Diffstat (limited to '')
6 files changed, 69 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/ILandChannel.cs b/OpenSim/Region/Environment/Interfaces/ILandChannel.cs index 7da4d3c..a8a58ef 100644 --- a/OpenSim/Region/Environment/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Environment/Interfaces/ILandChannel.cs | |||
@@ -34,7 +34,6 @@ namespace OpenSim.Region.Environment.Interfaces | |||
34 | { | 34 | { |
35 | public interface ILandChannel | 35 | public interface ILandChannel |
36 | { | 36 | { |
37 | |||
38 | List<ILandObject> ParcelsNearPoint(Vector3 position); | 37 | List<ILandObject> ParcelsNearPoint(Vector3 position); |
39 | List<ILandObject> AllParcels(); | 38 | List<ILandObject> AllParcels(); |
40 | ILandObject GetLandObject(int x, int y); | 39 | ILandObject GetLandObject(int x, int y); |
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs index 892d1ae..9de0181 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs | |||
@@ -95,7 +95,6 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
95 | 95 | ||
96 | public ILandObject GetLandObject(int x, int y) | 96 | public ILandObject GetLandObject(int x, int y) |
97 | { | 97 | { |
98 | |||
99 | if (m_landManagementModule != null) | 98 | if (m_landManagementModule != null) |
100 | { | 99 | { |
101 | return m_landManagementModule.GetLandObject(x, y); | 100 | return m_landManagementModule.GetLandObject(x, y); |
@@ -185,6 +184,5 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
185 | } | 184 | } |
186 | 185 | ||
187 | #endregion | 186 | #endregion |
188 | |||
189 | } | 187 | } |
190 | } | 188 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 67e23b5..ee0f6b1 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -71,6 +71,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
71 | //public TerrainEngine Terrain; | 71 | //public TerrainEngine Terrain; |
72 | public ITerrainChannel Heightmap; | 72 | public ITerrainChannel Heightmap; |
73 | 73 | ||
74 | /// <value> | ||
75 | /// Allows retrieval of land information for this scene. | ||
76 | /// </value> | ||
74 | public ILandChannel LandChannel; | 77 | public ILandChannel LandChannel; |
75 | 78 | ||
76 | protected EventManager m_eventManager; | 79 | protected EventManager m_eventManager; |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs index 39f357a..4cab32a 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/ScenePresenceTests.cs | |||
@@ -57,8 +57,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
57 | [Test] | 57 | [Test] |
58 | public void TestAddRootAgent() | 58 | public void TestAddRootAgent() |
59 | { | 59 | { |
60 | // Scene scene = SceneTestUtils.SetupScene(); | 60 | Scene scene = SceneTestUtils.SetupScene(); |
61 | SceneTestUtils.SetupScene(); | ||
62 | 61 | ||
63 | AgentCircuitData agent = new AgentCircuitData(); | 62 | AgentCircuitData agent = new AgentCircuitData(); |
64 | agent.AgentID = UUID.Zero; | 63 | agent.AgentID = UUID.Zero; |
@@ -72,7 +71,7 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
72 | agent.startpos = Vector3.Zero; | 71 | agent.startpos = Vector3.Zero; |
73 | agent.CapsPath = "http://wibble.com"; | 72 | agent.CapsPath = "http://wibble.com"; |
74 | 73 | ||
75 | //scene.NewUserConnection(agent); | 74 | scene.NewUserConnection(agent); |
76 | 75 | ||
77 | // There are going to be more parts to this. | 76 | // There are going to be more parts to this. |
78 | } | 77 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs index c20dacf..26c148f 100644 --- a/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs +++ b/OpenSim/Region/Environment/Scenes/Tests/SceneTestUtils.cs | |||
@@ -29,6 +29,7 @@ using Nini.Config; | |||
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
31 | using OpenSim.Framework.Communications; | 31 | using OpenSim.Framework.Communications; |
32 | using OpenSim.Framework.Servers; | ||
32 | using OpenSim.Region.Environment.Scenes; | 33 | using OpenSim.Region.Environment.Scenes; |
33 | 34 | ||
34 | namespace OpenSim.Region.Environment.Scenes.Tests | 35 | namespace OpenSim.Region.Environment.Scenes.Tests |
@@ -41,19 +42,27 @@ namespace OpenSim.Region.Environment.Scenes.Tests | |||
41 | /// <summary> | 42 | /// <summary> |
42 | /// Set up a test scene | 43 | /// Set up a test scene |
43 | /// </summary> | 44 | /// </summary> |
45 | /// <returns></returns> | ||
44 | public static TestScene SetupScene() | 46 | public static TestScene SetupScene() |
45 | { | 47 | { |
46 | RegionInfo regInfo = new RegionInfo(1000, 1000, null, null); | 48 | RegionInfo regInfo = new RegionInfo(1000, 1000, null, null); |
47 | regInfo.RegionName = "Unit test region"; | 49 | regInfo.RegionName = "Unit test region"; |
50 | regInfo.ExternalHostName = "1.2.3.4"; | ||
51 | |||
48 | AgentCircuitManager acm = new AgentCircuitManager(); | 52 | AgentCircuitManager acm = new AgentCircuitManager(); |
49 | //CommunicationsManager cm = new CommunicationsManager(null, null, null, false, null); | 53 | CommunicationsManager cm = new CommunicationsManager(null, null, null, false, null); |
50 | CommunicationsManager cm = null; | ||
51 | //SceneCommunicationService scs = new SceneCommunicationService(cm); | 54 | //SceneCommunicationService scs = new SceneCommunicationService(cm); |
52 | SceneCommunicationService scs = null; | 55 | SceneCommunicationService scs = null; |
53 | StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); | 56 | StorageManager sm = new OpenSim.Region.Environment.StorageManager("OpenSim.Data.Null.dll", "", ""); |
57 | BaseHttpServer httpServer = new BaseHttpServer(666); | ||
54 | IConfigSource configSource = new IniConfigSource(); | 58 | IConfigSource configSource = new IniConfigSource(); |
55 | 59 | ||
56 | return new TestScene(regInfo, acm, cm, scs, null, sm, null, null, false, false, false, configSource, null); | 60 | TestScene testScene = new TestScene( |
61 | regInfo, acm, cm, scs, null, sm, httpServer, null, false, false, false, configSource, null); | ||
62 | |||
63 | testScene.LandChannel = new TestLandChannel(); | ||
64 | |||
65 | return testScene; | ||
57 | } | 66 | } |
58 | 67 | ||
59 | /// <summary> | 68 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestLandChannel.cs b/OpenSim/Region/Environment/Scenes/Tests/TestLandChannel.cs new file mode 100644 index 0000000..2bc8974 --- /dev/null +++ b/OpenSim/Region/Environment/Scenes/Tests/TestLandChannel.cs | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System.Collections.Generic; | ||
29 | using OpenMetaverse; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenSim.Region.Environment.Interfaces; | ||
32 | |||
33 | namespace OpenSim.Region.Environment.Scenes.Tests | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// Land channel for test purposes | ||
37 | /// </summary> | ||
38 | public class TestLandChannel : ILandChannel | ||
39 | { | ||
40 | public List<ILandObject> ParcelsNearPoint(Vector3 position) { return null; } | ||
41 | public List<ILandObject> AllParcels() { return null; } | ||
42 | public ILandObject GetLandObject(int x, int y) { return null; } | ||
43 | public ILandObject GetLandObject(float x, float y) { return null; } | ||
44 | public bool IsLandPrimCountTainted() { return false; } | ||
45 | public bool IsForcefulBansAllowed() { return false; } | ||
46 | public void UpdateLandObject(int localID, LandData data) {} | ||
47 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) {} | ||
48 | public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {} | ||
49 | public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {} | ||
50 | public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) {} | ||
51 | } | ||
52 | } | ||