aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2013-09-16 22:32:53 +0100
committerMelanie2013-09-16 22:32:53 +0100
commit72206a0e294865bf0c93ea16910276a188d51ce6 (patch)
treef7769826d78863b2e0e416fe529f0c55065e0acd /OpenSim/Region/Framework/Scenes
parentMerge branch 'master' into careminster (diff)
parentMono 2.0 fix - call ToArray() explicitly (diff)
downloadopensim-SC-72206a0e294865bf0c93ea16910276a188d51ce6.zip
opensim-SC-72206a0e294865bf0c93ea16910276a188d51ce6.tar.gz
opensim-SC-72206a0e294865bf0c93ea16910276a188d51ce6.tar.bz2
opensim-SC-72206a0e294865bf0c93ea16910276a188d51ce6.tar.xz
Merge branch 'avination-current' into careminster
Conflicts: OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/KeyframeMotion.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs25
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs6
7 files changed, 27 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
index 29652aa..c0057ee 100644
--- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
+++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
@@ -632,7 +632,7 @@ namespace OpenSim.Region.Framework.Scenes
632 632
633 // Do the frame processing 633 // Do the frame processing
634 double steps = (double)m_currentFrame.TimeMS / tickDuration; 634 double steps = (double)m_currentFrame.TimeMS / tickDuration;
635 635
636 if (steps <= 0.0) 636 if (steps <= 0.0)
637 { 637 {
638 m_group.RootPart.Velocity = Vector3.Zero; 638 m_group.RootPart.Velocity = Vector3.Zero;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 18e7eb8..d6d2df4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2820,8 +2820,10 @@ namespace OpenSim.Region.Framework.Scenes
2820 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); 2820 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
2821 newObject.ResumeScripts(); 2821 newObject.ResumeScripts();
2822 2822
2823 if (newObject.RootPart.KeyframeMotion != null) 2823 // AddSceneObject already does this and doing it again messes
2824 newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); 2824 // up region crossings, so don't.
2825 //if (newObject.RootPart.KeyframeMotion != null)
2826 // newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject);
2825 } 2827 }
2826 2828
2827 // Do this as late as possible so that listeners have full access to the incoming object 2829 // Do this as late as possible so that listeners have full access to the incoming object
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 9e3d875..6deb870 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -591,6 +591,7 @@ namespace OpenSim.Region.Framework.Scenes
591 avinfo.ParentID = av.ParentID; 591 avinfo.ParentID = av.ParentID;
592 avsToCross.Add(avinfo); 592 avsToCross.Add(avinfo);
593 593
594 av.PrevSitOffset = av.OffsetPosition;
594 av.ParentID = 0; 595 av.ParentID = 0;
595 } 596 }
596 597
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 88ecda2..183d8d1 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -265,7 +265,7 @@ namespace OpenSim.Region.Framework.Scenes
265 265
266 private int m_movementAnimationUpdateCounter = 0; 266 private int m_movementAnimationUpdateCounter = 0;
267 267
268 private Vector3 m_prevSitOffset; 268 public Vector3 PrevSitOffset { get; set; }
269 269
270 protected AvatarAppearance m_appearance; 270 protected AvatarAppearance m_appearance;
271 271
@@ -997,7 +997,7 @@ namespace OpenSim.Region.Framework.Scenes
997// ParentPosition = part.GetWorldPosition(); 997// ParentPosition = part.GetWorldPosition();
998 ParentID = part.LocalId; 998 ParentID = part.LocalId;
999 ParentPart = part; 999 ParentPart = part;
1000 m_pos = m_prevSitOffset; 1000 m_pos = PrevSitOffset;
1001// pos = ParentPosition; 1001// pos = ParentPosition;
1002 pos = part.GetWorldPosition(); 1002 pos = part.GetWorldPosition();
1003 } 1003 }
@@ -2414,6 +2414,7 @@ namespace OpenSim.Region.Framework.Scenes
2414 2414
2415 if (ParentID != 0) 2415 if (ParentID != 0)
2416 { 2416 {
2417 PrevSitOffset = m_pos; // Save sit offset
2417 SceneObjectPart part = ParentPart; 2418 SceneObjectPart part = ParentPart;
2418 UnRegisterSeatControls(part.ParentGroup.UUID); 2419 UnRegisterSeatControls(part.ParentGroup.UUID);
2419 2420
@@ -3649,7 +3650,7 @@ namespace OpenSim.Region.Framework.Scenes
3649 cAgent.Appearance = new AvatarAppearance(Appearance); 3650 cAgent.Appearance = new AvatarAppearance(Appearance);
3650 3651
3651 cAgent.ParentPart = ParentUUID; 3652 cAgent.ParentPart = ParentUUID;
3652 cAgent.SitOffset = m_pos; 3653 cAgent.SitOffset = PrevSitOffset;
3653 3654
3654 lock (scriptedcontrols) 3655 lock (scriptedcontrols)
3655 { 3656 {
@@ -3692,7 +3693,7 @@ namespace OpenSim.Region.Framework.Scenes
3692 CameraLeftAxis = cAgent.LeftAxis; 3693 CameraLeftAxis = cAgent.LeftAxis;
3693 CameraUpAxis = cAgent.UpAxis; 3694 CameraUpAxis = cAgent.UpAxis;
3694 ParentUUID = cAgent.ParentPart; 3695 ParentUUID = cAgent.ParentPart;
3695 m_prevSitOffset = cAgent.SitOffset; 3696 PrevSitOffset = cAgent.SitOffset;
3696 3697
3697 // When we get to the point of re-computing neighbors everytime this 3698 // When we get to the point of re-computing neighbors everytime this
3698 // changes, then start using the agent's drawdistance rather than the 3699 // changes, then start using the agent's drawdistance rather than the
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
index 5b5fb92..95b30d5 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
@@ -83,8 +83,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
83 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001"); 83 UUID userId = UUID.Parse("10000000-0000-0000-0000-000000000001");
84 84
85 TestScene scene = new SceneHelpers().SetupScene(); 85 TestScene scene = new SceneHelpers().SetupScene();
86 SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); 86 IConfigSource configSource = new IniConfigSource();
87 TestClient client = (TestClient)SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 87 IConfig config = configSource.AddConfig("Startup");
88 config.Set("serverside_object_permissions", true);
89 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
90 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
88 91
89 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 92 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
90 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; 93 AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
@@ -106,9 +109,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
106 109
107 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); 110 SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
108 Assert.That(retrievedPart2, Is.Null); 111 Assert.That(retrievedPart2, Is.Null);
109
110 Assert.That(client.ReceivedKills.Count, Is.EqualTo(1));
111 Assert.That(client.ReceivedKills[0], Is.EqualTo(soLocalId));
112 } 112 }
113 113
114 /// <summary> 114 /// <summary>
@@ -135,7 +135,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
135 SceneHelpers.SetupSceneModules(sceneB, config, etmB); 135 SceneHelpers.SetupSceneModules(sceneB, config, etmB);
136 136
137 // We need this for derez 137 // We need this for derez
138 SceneHelpers.SetupSceneModules(sceneA, new PermissionsModule()); 138 //SceneHelpers.SetupSceneModules(sceneA, new PermissionsModule());
139 139
140 UserAccount uaA = UserAccountHelpers.CreateUserWithInventory(sceneA, "Andy", "AAA", 0x1, ""); 140 UserAccount uaA = UserAccountHelpers.CreateUserWithInventory(sceneA, "Andy", "AAA", 0x1, "");
141 UserAccount uaB = UserAccountHelpers.CreateUserWithInventory(sceneA, "Brian", "BBB", 0x2, ""); 141 UserAccount uaB = UserAccountHelpers.CreateUserWithInventory(sceneA, "Brian", "BBB", 0x2, "");
@@ -155,12 +155,6 @@ namespace OpenSim.Region.Framework.Scenes.Tests
155 uint soLocalId = so.LocalId; 155 uint soLocalId = so.LocalId;
156 156
157 sceneA.DeleteSceneObject(so, false); 157 sceneA.DeleteSceneObject(so, false);
158
159 Assert.That(clientA.ReceivedKills.Count, Is.EqualTo(1));
160 Assert.That(clientA.ReceivedKills[0], Is.EqualTo(soLocalId));
161
162 Assert.That(childClientsB[0].ReceivedKills.Count, Is.EqualTo(1));
163 Assert.That(childClientsB[0].ReceivedKills[0], Is.EqualTo(soLocalId));
164 } 158 }
165 159
166 /// <summary> 160 /// <summary>
@@ -179,7 +173,10 @@ namespace OpenSim.Region.Framework.Scenes.Tests
179 UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001"); 173 UUID objectOwnerId = UUID.Parse("20000000-0000-0000-0000-000000000001");
180 174
181 TestScene scene = new SceneHelpers().SetupScene(); 175 TestScene scene = new SceneHelpers().SetupScene();
182 SceneHelpers.SetupSceneModules(scene, new PermissionsModule()); 176 IConfigSource configSource = new IniConfigSource();
177 IConfig config = configSource.AddConfig("Startup");
178 config.Set("serverside_object_permissions", true);
179 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
183 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 180 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
184 181
185 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 182 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
@@ -262,4 +259,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
262// Assert.That(retrievedPart, Is.Null); 259// Assert.That(retrievedPart, Is.Null);
263 } 260 }
264 } 261 }
265} \ No newline at end of file 262}
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
index c7eaff9..e7a1fe0 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
71 71
72 SceneHelpers.SetupSceneModules( 72 SceneHelpers.SetupSceneModules(
73 scene, configSource, new object[] 73 scene, configSource, new object[]
74 { new PermissionsModule(), 74 { new DefaultPermissionsModule(),
75 new GroupsModule(), 75 new GroupsModule(),
76 new MockGroupsServicesConnector() }); 76 new MockGroupsServicesConnector() });
77 77
@@ -82,4 +82,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
82 groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true); 82 groupsModule.CreateGroup(client, "group1", "To boldly go", true, UUID.Zero, 5, true, true, true);
83 } 83 }
84 } 84 }
85} \ No newline at end of file 85}
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index 8c25dbc..fff542b 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -282,7 +282,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
282 // We need to set up the permisions module on scene B so that our later use of agent limit to deny 282 // We need to set up the permisions module on scene B so that our later use of agent limit to deny
283 // QueryAccess won't succeed anyway because administrators are always allowed in and the default 283 // QueryAccess won't succeed anyway because administrators are always allowed in and the default
284 // IsAdministrator if no permissions module is present is true. 284 // IsAdministrator if no permissions module is present is true.
285 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); 285 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB });
286 286
287 // Shared scene modules 287 // Shared scene modules
288 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); 288 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
@@ -447,7 +447,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
447 // We need to set up the permisions module on scene B so that our later use of agent limit to deny 447 // We need to set up the permisions module on scene B so that our later use of agent limit to deny
448 // QueryAccess won't succeed anyway because administrators are always allowed in and the default 448 // QueryAccess won't succeed anyway because administrators are always allowed in and the default
449 // IsAdministrator if no permissions module is present is true. 449 // IsAdministrator if no permissions module is present is true.
450 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); 450 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB });
451 451
452 // Shared scene modules 452 // Shared scene modules
453 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); 453 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
@@ -660,4 +660,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
660// TestHelpers.DisableLogging(); 660// TestHelpers.DisableLogging();
661 } 661 }
662 } 662 }
663} \ No newline at end of file 663}