diff options
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 28 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 28 |
5 files changed, 55 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index dd9210f..906c1ee 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -335,7 +335,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
335 | { | 335 | { |
336 | // Needs to determine which engine was running it and use that | 336 | // Needs to determine which engine was running it and use that |
337 | // | 337 | // |
338 | errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0); | 338 | errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 1); |
339 | } | 339 | } |
340 | 340 | ||
341 | // Tell anyone managing scripts that a script has been reloaded/changed | 341 | // Tell anyone managing scripts that a script has been reloaded/changed |
@@ -2503,6 +2503,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2503 | } | 2503 | } |
2504 | 2504 | ||
2505 | m_sceneGraph.LinkObjects(root, children); | 2505 | m_sceneGraph.LinkObjects(root, children); |
2506 | |||
2507 | ScenePresence sp; | ||
2508 | if (TryGetScenePresence(agentId, out sp)) | ||
2509 | { | ||
2510 | root.SendPropertiesToClient(sp.ControllingClient); | ||
2511 | } | ||
2506 | } | 2512 | } |
2507 | 2513 | ||
2508 | private string PermissionString(uint permissions) | 2514 | private string PermissionString(uint permissions) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ccb4aad..649d545 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1674,7 +1674,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1674 | { | 1674 | { |
1675 | List<SceneObjectGroup> objs = new List<SceneObjectGroup>(); | 1675 | List<SceneObjectGroup> objs = new List<SceneObjectGroup>(); |
1676 | lock (m_groupsWithTargets) | 1676 | lock (m_groupsWithTargets) |
1677 | objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values); | 1677 | { |
1678 | foreach (SceneObjectGroup grp in m_groupsWithTargets.Values) | ||
1679 | objs.Add(grp); | ||
1680 | } | ||
1678 | 1681 | ||
1679 | foreach (SceneObjectGroup entry in objs) | 1682 | foreach (SceneObjectGroup entry in objs) |
1680 | entry.checkAtTargets(); | 1683 | entry.checkAtTargets(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index e29b2c1..af13b46 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1849,6 +1849,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1849 | SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; | 1849 | SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup; |
1850 | } | 1850 | } |
1851 | 1851 | ||
1852 | parentGroup.AdjustChildPrimPermissions(); | ||
1852 | parentGroup.HasGroupChanged = true; | 1853 | parentGroup.HasGroupChanged = true; |
1853 | parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); | 1854 | parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true); |
1854 | parentGroup.ScheduleGroupForFullUpdate(); | 1855 | parentGroup.ScheduleGroupForFullUpdate(); |
@@ -1989,6 +1990,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1989 | // return unless the root is deleted. This will remove them | 1990 | // return unless the root is deleted. This will remove them |
1990 | // from the database. They will be rewritten immediately, | 1991 | // from the database. They will be rewritten immediately, |
1991 | // minus the rows for the unlinked child prims. | 1992 | // minus the rows for the unlinked child prims. |
1993 | g.AdjustChildPrimPermissions(); | ||
1992 | m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID); | 1994 | m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID); |
1993 | g.TriggerScriptChangedEvent(Changed.LINK); | 1995 | g.TriggerScriptChangedEvent(Changed.LINK); |
1994 | g.HasGroupChanged = true; // Persist | 1996 | g.HasGroupChanged = true; // Persist |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f490d90..ee61de6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -307,6 +307,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
307 | 307 | ||
308 | private bool m_isBackedUp; | 308 | private bool m_isBackedUp; |
309 | 309 | ||
310 | public bool IsBackedUp | ||
311 | { | ||
312 | get { return m_isBackedUp; } | ||
313 | } | ||
314 | |||
310 | protected MapAndArray<UUID, SceneObjectPart> m_parts = new MapAndArray<UUID, SceneObjectPart>(); | 315 | protected MapAndArray<UUID, SceneObjectPart> m_parts = new MapAndArray<UUID, SceneObjectPart>(); |
311 | 316 | ||
312 | protected ulong m_regionHandle; | 317 | protected ulong m_regionHandle; |
@@ -3410,11 +3415,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3410 | 3415 | ||
3411 | public void AdjustChildPrimPermissions() | 3416 | public void AdjustChildPrimPermissions() |
3412 | { | 3417 | { |
3418 | uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits | ||
3419 | uint foldedPerms = RootPart.OwnerMask & 3; | ||
3420 | |||
3413 | ForEachPart(part => | 3421 | ForEachPart(part => |
3414 | { | 3422 | { |
3423 | newOwnerMask &= part.BaseMask; | ||
3415 | if (part != RootPart) | 3424 | if (part != RootPart) |
3416 | part.ClonePermissions(RootPart); | 3425 | part.ClonePermissions(RootPart); |
3417 | }); | 3426 | }); |
3427 | |||
3428 | RootPart.OwnerMask = newOwnerMask | foldedPerms; | ||
3429 | RootPart.ScheduleFullUpdate(); | ||
3418 | } | 3430 | } |
3419 | 3431 | ||
3420 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, | 3432 | public void UpdatePermissions(UUID AgentID, byte field, uint localID, |
@@ -3422,8 +3434,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
3422 | { | 3434 | { |
3423 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); | 3435 | RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF); |
3424 | 3436 | ||
3437 | bool god = Scene.Permissions.IsGod(AgentID); | ||
3438 | |||
3439 | if (field == 1 && god) | ||
3440 | { | ||
3441 | ForEachPart(part => | ||
3442 | { | ||
3443 | part.BaseMask = RootPart.BaseMask; | ||
3444 | }); | ||
3445 | } | ||
3446 | |||
3425 | AdjustChildPrimPermissions(); | 3447 | AdjustChildPrimPermissions(); |
3426 | 3448 | ||
3449 | if (field == 1 && god) // Base mask was set. Update all child part inventories | ||
3450 | { | ||
3451 | foreach (SceneObjectPart part in Parts) | ||
3452 | part.Inventory.ApplyGodPermissions(RootPart.BaseMask); | ||
3453 | } | ||
3454 | |||
3427 | HasGroupChanged = true; | 3455 | HasGroupChanged = true; |
3428 | 3456 | ||
3429 | // Send the group's properties to all clients once all parts are updated | 3457 | // Send the group's properties to all clients once all parts are updated |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 1857757..49b771f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4468,7 +4468,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4468 | if (god) | 4468 | if (god) |
4469 | { | 4469 | { |
4470 | BaseMask = ApplyMask(BaseMask, set, mask); | 4470 | BaseMask = ApplyMask(BaseMask, set, mask); |
4471 | Inventory.ApplyGodPermissions(_baseMask); | 4471 | Inventory.ApplyGodPermissions(BaseMask); |
4472 | } | 4472 | } |
4473 | 4473 | ||
4474 | break; | 4474 | break; |
@@ -4487,7 +4487,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4487 | case 16: | 4487 | case 16: |
4488 | NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) & | 4488 | NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) & |
4489 | baseMask; | 4489 | baseMask; |
4490 | // Prevent the client from creating no mod, no copy | 4490 | // Prevent the client from creating no copy, no transfer |
4491 | // objects | 4491 | // objects |
4492 | if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0) | 4492 | if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0) |
4493 | NextOwnerMask |= (uint)PermissionMask.Transfer; | 4493 | NextOwnerMask |= (uint)PermissionMask.Transfer; |
@@ -4505,20 +4505,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
4505 | { | 4505 | { |
4506 | bool update = false; | 4506 | bool update = false; |
4507 | 4507 | ||
4508 | if (BaseMask != source.BaseMask || | 4508 | uint prevOwnerMask = OwnerMask; |
4509 | OwnerMask != source.OwnerMask || | 4509 | uint prevGroupMask = GroupMask; |
4510 | GroupMask != source.GroupMask || | 4510 | uint prevEveryoneMask = EveryoneMask; |
4511 | EveryoneMask != source.EveryoneMask || | 4511 | uint prevNextOwnerMask = NextOwnerMask; |
4512 | NextOwnerMask != source.NextOwnerMask) | ||
4513 | update = true; | ||
4514 | 4512 | ||
4515 | BaseMask = source.BaseMask; | 4513 | OwnerMask = source.OwnerMask & BaseMask; |
4516 | OwnerMask = source.OwnerMask; | 4514 | GroupMask = source.GroupMask & BaseMask; |
4517 | GroupMask = source.GroupMask; | 4515 | EveryoneMask = source.EveryoneMask & BaseMask; |
4518 | EveryoneMask = source.EveryoneMask; | 4516 | NextOwnerMask = source.NextOwnerMask & BaseMask; |
4519 | NextOwnerMask = source.NextOwnerMask; | ||
4520 | 4517 | ||
4521 | if (update) | 4518 | if (OwnerMask != prevOwnerMask || |
4519 | GroupMask != prevGroupMask || | ||
4520 | EveryoneMask != prevEveryoneMask || | ||
4521 | NextOwnerMask != prevNextOwnerMask) | ||
4522 | SendFullUpdateToAllClients(); | 4522 | SendFullUpdateToAllClients(); |
4523 | } | 4523 | } |
4524 | 4524 | ||