aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-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.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/SceneObjectUserGroupTests.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs6
7 files changed, 26 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
index 09481a7..f0e639d 100644
--- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
+++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs
@@ -662,7 +662,7 @@ namespace OpenSim.Region.Framework.Scenes
662 662
663 // Do the frame processing 663 // Do the frame processing
664 double steps = (double)m_currentFrame.TimeMS / tickDuration; 664 double steps = (double)m_currentFrame.TimeMS / tickDuration;
665 665
666 if (steps <= 0.0) 666 if (steps <= 0.0)
667 { 667 {
668 m_group.RootPart.Velocity = Vector3.Zero; 668 m_group.RootPart.Velocity = Vector3.Zero;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2b58795..b189599 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2802,8 +2802,10 @@ namespace OpenSim.Region.Framework.Scenes
2802 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); 2802 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
2803 newObject.ResumeScripts(); 2803 newObject.ResumeScripts();
2804 2804
2805 if (newObject.RootPart.KeyframeMotion != null) 2805 // AddSceneObject already does this and doing it again messes
2806 newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); 2806 // up region crossings, so don't.
2807 //if (newObject.RootPart.KeyframeMotion != null)
2808 // newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject);
2807 } 2809 }
2808 2810
2809 // Do this as late as possible so that listeners have full access to the incoming object 2811 // 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 0ea4e09..3e1dcaa 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
@@ -1072,6 +1073,11 @@ namespace OpenSim.Region.Framework.Scenes
1072 for (int i = 0; i < parts.Length; i++) 1073 for (int i = 0; i < parts.Length; i++)
1073 { 1074 {
1074 SceneObjectPart part = parts[i]; 1075 SceneObjectPart part = parts[i];
1076 if (part.KeyframeMotion != null)
1077 {
1078 part.KeyframeMotion.UpdateSceneObject(this);
1079 }
1080
1075 if (Object.ReferenceEquals(part, m_rootPart)) 1081 if (Object.ReferenceEquals(part, m_rootPart))
1076 continue; 1082 continue;
1077 1083
@@ -3483,8 +3489,8 @@ namespace OpenSim.Region.Framework.Scenes
3483 part.ClonePermissions(RootPart); 3489 part.ClonePermissions(RootPart);
3484 }); 3490 });
3485 3491
3486 uint lockMask = ~(uint)PermissionMask.Move; 3492 uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify);
3487 uint lockBit = RootPart.OwnerMask & (uint)PermissionMask.Move; 3493 uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move | PermissionMask.Modify);
3488 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); 3494 RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask);
3489 RootPart.ScheduleFullUpdate(); 3495 RootPart.ScheduleFullUpdate();
3490 } 3496 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0ab267a..7004d23 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -242,7 +242,7 @@ namespace OpenSim.Region.Framework.Scenes
242 242
243 private int m_movementAnimationUpdateCounter = 0; 243 private int m_movementAnimationUpdateCounter = 0;
244 244
245 private Vector3 m_prevSitOffset; 245 public Vector3 PrevSitOffset { get; set; }
246 246
247 protected AvatarAppearance m_appearance; 247 protected AvatarAppearance m_appearance;
248 248
@@ -957,7 +957,7 @@ namespace OpenSim.Region.Framework.Scenes
957// ParentPosition = part.GetWorldPosition(); 957// ParentPosition = part.GetWorldPosition();
958 ParentID = part.LocalId; 958 ParentID = part.LocalId;
959 ParentPart = part; 959 ParentPart = part;
960 m_pos = m_prevSitOffset; 960 m_pos = PrevSitOffset;
961// pos = ParentPosition; 961// pos = ParentPosition;
962 pos = part.GetWorldPosition(); 962 pos = part.GetWorldPosition();
963 } 963 }
@@ -2261,6 +2261,7 @@ namespace OpenSim.Region.Framework.Scenes
2261 2261
2262 if (ParentID != 0) 2262 if (ParentID != 0)
2263 { 2263 {
2264 PrevSitOffset = m_pos; // Save sit offset
2264 SceneObjectPart part = ParentPart; 2265 SceneObjectPart part = ParentPart;
2265 UnRegisterSeatControls(part.ParentGroup.UUID); 2266 UnRegisterSeatControls(part.ParentGroup.UUID);
2266 2267
@@ -3487,7 +3488,7 @@ namespace OpenSim.Region.Framework.Scenes
3487 cAgent.Appearance = new AvatarAppearance(Appearance); 3488 cAgent.Appearance = new AvatarAppearance(Appearance);
3488 3489
3489 cAgent.ParentPart = ParentUUID; 3490 cAgent.ParentPart = ParentUUID;
3490 cAgent.SitOffset = m_pos; 3491 cAgent.SitOffset = PrevSitOffset;
3491 3492
3492 lock (scriptedcontrols) 3493 lock (scriptedcontrols)
3493 { 3494 {
@@ -3530,7 +3531,7 @@ namespace OpenSim.Region.Framework.Scenes
3530 CameraLeftAxis = cAgent.LeftAxis; 3531 CameraLeftAxis = cAgent.LeftAxis;
3531 CameraUpAxis = cAgent.UpAxis; 3532 CameraUpAxis = cAgent.UpAxis;
3532 ParentUUID = cAgent.ParentPart; 3533 ParentUUID = cAgent.ParentPart;
3533 m_prevSitOffset = cAgent.SitOffset; 3534 PrevSitOffset = cAgent.SitOffset;
3534 3535
3535 // When we get to the point of re-computing neighbors everytime this 3536 // When we get to the point of re-computing neighbors everytime this
3536 // changes, then start using the agent's drawdistance rather than the 3537 // 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 52ad538..9557cd0 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectDeRezTests.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
67 IConfigSource configSource = new IniConfigSource(); 67 IConfigSource configSource = new IniConfigSource();
68 IConfig config = configSource.AddConfig("Startup"); 68 IConfig config = configSource.AddConfig("Startup");
69 config.Set("serverside_object_permissions", true); 69 config.Set("serverside_object_permissions", true);
70 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); 70 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
71 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 71 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
72 72
73 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 73 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
112 IConfigSource configSource = new IniConfigSource(); 112 IConfigSource configSource = new IniConfigSource();
113 IConfig config = configSource.AddConfig("Startup"); 113 IConfig config = configSource.AddConfig("Startup");
114 config.Set("serverside_object_permissions", true); 114 config.Set("serverside_object_permissions", true);
115 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new PermissionsModule() }); 115 SceneHelpers.SetupSceneModules(scene, configSource, new object[] { new DefaultPermissionsModule() });
116 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient; 116 IClientAPI client = SceneHelpers.AddScenePresence(scene, userId).ControllingClient;
117 117
118 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. 118 // Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
@@ -195,4 +195,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
195// Assert.That(retrievedPart, Is.Null); 195// Assert.That(retrievedPart, Is.Null);
196 } 196 }
197 } 197 }
198} \ No newline at end of file 198}
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 de4458d..8d94d29 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
216 // We need to set up the permisions module on scene B so that our later use of agent limit to deny 216 // We need to set up the permisions module on scene B so that our later use of agent limit to deny
217 // QueryAccess won't succeed anyway because administrators are always allowed in and the default 217 // QueryAccess won't succeed anyway because administrators are always allowed in and the default
218 // IsAdministrator if no permissions module is present is true. 218 // IsAdministrator if no permissions module is present is true.
219 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); 219 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB });
220 220
221 // Shared scene modules 221 // Shared scene modules
222 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); 222 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
381 // We need to set up the permisions module on scene B so that our later use of agent limit to deny 381 // We need to set up the permisions module on scene B so that our later use of agent limit to deny
382 // QueryAccess won't succeed anyway because administrators are always allowed in and the default 382 // QueryAccess won't succeed anyway because administrators are always allowed in and the default
383 // IsAdministrator if no permissions module is present is true. 383 // IsAdministrator if no permissions module is present is true.
384 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); 384 SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new DefaultPermissionsModule(), etmB });
385 385
386 // Shared scene modules 386 // Shared scene modules
387 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); 387 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
@@ -507,4 +507,4 @@ namespace OpenSim.Region.Framework.Scenes.Tests
507// TestHelpers.DisableLogging(); 507// TestHelpers.DisableLogging();
508 } 508 }
509 } 509 }
510} \ No newline at end of file 510}