aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-07 00:02:45 +0100
committerJustin Clark-Casey (justincc)2012-07-07 00:02:45 +0100
commit7ff4eec79cf16886439604a23126abd195ae8b2e (patch)
treef59be673321e6a74dc429e52e585ef165a8a845d /OpenSim/Region/ScriptEngine
parentRemove now duplicate interregion object check that should have been removed a... (diff)
downloadopensim-SC_OLD-7ff4eec79cf16886439604a23126abd195ae8b2e.zip
opensim-SC_OLD-7ff4eec79cf16886439604a23126abd195ae8b2e.tar.gz
opensim-SC_OLD-7ff4eec79cf16886439604a23126abd195ae8b2e.tar.bz2
opensim-SC_OLD-7ff4eec79cf16886439604a23126abd195ae8b2e.tar.xz
Remove redundant SetScene() function in Scene.AddSceneObject()
This is always done later on in SceneGraph.AddSceneObject() if the call hasn't failed due to sanity checks. There's no other purpose for this method to exist and it's dangerous/pointless to call in other conditions.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs6
2 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs
index 3965734..c8718d9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
79 /// Test creation of an NPC where the appearance data comes from a notecard 79 /// Test creation of an NPC where the appearance data comes from a notecard
80 /// </summary> 80 /// </summary>
81 [Test] 81 [Test]
82 public void TestOsNpcCreateFromNotecard() 82 public void TestOsNpcCreateUsingAppearanceFromNotecard()
83 { 83 {
84 TestHelpers.InMethod(); 84 TestHelpers.InMethod();
85// log4net.Config.XmlConfigurator.Configure(); 85// log4net.Config.XmlConfigurator.Configure();
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
90 90
91 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 91 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
92 sp.Appearance.AvatarHeight = newHeight; 92 sp.Appearance.AvatarHeight = newHeight;
93 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); 93 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, 0x10);
94 SceneObjectPart part = so.RootPart; 94 SceneObjectPart part = so.RootPart;
95 m_scene.AddSceneObject(so); 95 m_scene.AddSceneObject(so);
96 96
@@ -114,10 +114,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
114 /// Test creation of an NPC where the appearance data comes from an avatar already in the region. 114 /// Test creation of an NPC where the appearance data comes from an avatar already in the region.
115 /// </summary> 115 /// </summary>
116 [Test] 116 [Test]
117 public void TestOsNpcCreateFromAvatar() 117 public void TestOsNpcCreateUsingAppearanceFromAvatar()
118 { 118 {
119 TestHelpers.InMethod(); 119 TestHelpers.InMethod();
120// log4net.Config.XmlConfigurator.Configure(); 120// TestHelpers.EnableLogging();
121 121
122 // Store an avatar with a different height from default in a notecard. 122 // Store an avatar with a different height from default in a notecard.
123 UUID userId = TestHelpers.ParseTail(0x1); 123 UUID userId = TestHelpers.ParseTail(0x1);
@@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
125 125
126 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 126 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
127 sp.Appearance.AvatarHeight = newHeight; 127 sp.Appearance.AvatarHeight = newHeight;
128 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); 128 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, 0x10);
129 SceneObjectPart part = so.RootPart; 129 SceneObjectPart part = so.RootPart;
130 m_scene.AddSceneObject(so); 130 m_scene.AddSceneObject(so);
131 131
@@ -156,7 +156,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
156 156
157 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 157 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
158 sp.Appearance.AvatarHeight = newHeight; 158 sp.Appearance.AvatarHeight = newHeight;
159 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); 159 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, 0x10);
160 SceneObjectPart part = so.RootPart; 160 SceneObjectPart part = so.RootPart;
161 m_scene.AddSceneObject(so); 161 m_scene.AddSceneObject(so);
162 162
@@ -197,7 +197,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
197 197
198 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, nonOwnerId); 198 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, nonOwnerId);
199 sp.Appearance.AvatarHeight = newHeight; 199 sp.Appearance.AvatarHeight = newHeight;
200 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, ownerId); 200 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, ownerId, 0x10);
201 SceneObjectPart part = so.RootPart; 201 SceneObjectPart part = so.RootPart;
202 m_scene.AddSceneObject(so); 202 m_scene.AddSceneObject(so);
203 203
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
index 813e53b..25679a6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs
@@ -97,11 +97,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
97 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 97 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
98 sp.Appearance.AvatarHeight = newHeight; 98 sp.Appearance.AvatarHeight = newHeight;
99 99
100 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); 100 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, 0x10);
101 SceneObjectPart part = so.RootPart; 101 SceneObjectPart part = so.RootPart;
102 m_scene.AddSceneObject(so); 102 m_scene.AddSceneObject(so);
103 103
104 SceneObjectGroup otherSo = SceneHelpers.CreateSceneObject(1, otherUserId); 104 SceneObjectGroup otherSo = SceneHelpers.CreateSceneObject(1, otherUserId, 0x20);
105 SceneObjectPart otherPart = otherSo.RootPart; 105 SceneObjectPart otherPart = otherSo.RootPart;
106 m_scene.AddSceneObject(otherSo); 106 m_scene.AddSceneObject(otherSo);
107 107
@@ -148,7 +148,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
148 148
149 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId); 149 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
150 sp.Appearance.AvatarHeight = newHeight; 150 sp.Appearance.AvatarHeight = newHeight;
151 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId); 151 SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, userId, 0x10);
152 SceneObjectPart part = so.RootPart; 152 SceneObjectPart part = so.RootPart;
153 m_scene.AddSceneObject(so); 153 m_scene.AddSceneObject(so);
154 154