diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
8 files changed, 45 insertions, 34 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.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 535d87a..4d90726 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
70 | public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene); | 70 | public delegate bool IsGridGodHandler(UUID user, Scene requestFromScene); |
71 | public delegate bool IsAdministratorHandler(UUID user); | 71 | public delegate bool IsAdministratorHandler(UUID user); |
72 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); | 72 | public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene); |
73 | public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene); | 73 | public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene, bool allowManager); |
74 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); | 74 | public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene); |
75 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); | 75 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); |
76 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); | 76 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); |
@@ -763,7 +763,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
763 | 763 | ||
764 | #region EDIT PARCEL | 764 | #region EDIT PARCEL |
765 | 765 | ||
766 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p) | 766 | public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p, bool allowManager) |
767 | { | 767 | { |
768 | EditParcelPropertiesHandler handler = OnEditParcelProperties; | 768 | EditParcelPropertiesHandler handler = OnEditParcelProperties; |
769 | if (handler != null) | 769 | if (handler != null) |
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
771 | Delegate[] list = handler.GetInvocationList(); | 771 | Delegate[] list = handler.GetInvocationList(); |
772 | foreach (EditParcelPropertiesHandler h in list) | 772 | foreach (EditParcelPropertiesHandler h in list) |
773 | { | 773 | { |
774 | if (h(user, parcel, p, m_scene) == false) | 774 | if (h(user, parcel, p, m_scene, allowManager) == false) |
775 | return false; | 775 | return false; |
776 | } | 776 | } |
777 | } | 777 | } |
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..86f60bb 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 | ||
@@ -1880,25 +1886,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1880 | { | 1886 | { |
1881 | SceneObjectPart part = parts[i]; | 1887 | SceneObjectPart part = parts[i]; |
1882 | 1888 | ||
1883 | Scene.ForEachRootScenePresence(delegate(ScenePresence avatar) | 1889 | if (Scene != null) |
1884 | { | 1890 | { |
1885 | if (avatar.ParentID == LocalId) | 1891 | Scene.ForEachRootScenePresence(delegate(ScenePresence avatar) |
1886 | avatar.StandUp(); | ||
1887 | |||
1888 | if (!silent) | ||
1889 | { | 1892 | { |
1890 | part.ClearUpdateSchedule(); | 1893 | if (avatar.ParentID == LocalId) |
1891 | if (part == m_rootPart) | 1894 | avatar.StandUp(); |
1895 | |||
1896 | if (!silent) | ||
1892 | { | 1897 | { |
1893 | if (!IsAttachment | 1898 | part.ClearUpdateSchedule(); |
1894 | || AttachedAvatar == avatar.ControllingClient.AgentId | 1899 | if (part == m_rootPart) |
1895 | || !HasPrivateAttachmentPoint) | 1900 | { |
1896 | avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId }); | 1901 | if (!IsAttachment |
1902 | || AttachedAvatar == avatar.ControllingClient.AgentId | ||
1903 | || !HasPrivateAttachmentPoint) | ||
1904 | avatar.ControllingClient.SendKillObject(m_regionHandle, new List<uint> { part.LocalId }); | ||
1905 | } | ||
1897 | } | 1906 | } |
1898 | } | 1907 | }); |
1899 | }); | 1908 | } |
1900 | } | 1909 | } |
1901 | |||
1902 | } | 1910 | } |
1903 | 1911 | ||
1904 | public void AddScriptLPS(int count) | 1912 | public void AddScriptLPS(int count) |
@@ -3483,8 +3491,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3483 | part.ClonePermissions(RootPart); | 3491 | part.ClonePermissions(RootPart); |
3484 | }); | 3492 | }); |
3485 | 3493 | ||
3486 | uint lockMask = ~(uint)PermissionMask.Move; | 3494 | uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify); |
3487 | uint lockBit = RootPart.OwnerMask & (uint)PermissionMask.Move; | 3495 | uint lockBit = RootPart.OwnerMask & (uint)(PermissionMask.Move | PermissionMask.Modify); |
3488 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); | 3496 | RootPart.OwnerMask = (RootPart.OwnerMask & lockBit) | ((newOwnerMask | foldedPerms) & lockMask); |
3489 | RootPart.ScheduleFullUpdate(); | 3497 | RootPart.ScheduleFullUpdate(); |
3490 | } | 3498 | } |
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 | } |