diff options
Diffstat (limited to 'OpenSim/Region')
11 files changed, 89 insertions, 52 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index c705f10..650cd50 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -1116,17 +1116,17 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1116 | else | 1116 | else |
1117 | { | 1117 | { |
1118 | AddNewInventoryItem(m_HostCapsObj.AgentID, item, (uint)cost); | 1118 | AddNewInventoryItem(m_HostCapsObj.AgentID, item, (uint)cost); |
1119 | if (client != null) | 1119 | // if (client != null) |
1120 | { | 1120 | // { |
1121 | // let users see anything.. i don't so far | 1121 | // // let users see anything.. i don't so far |
1122 | string str; | 1122 | // string str; |
1123 | if (cost > 0) | 1123 | // if (cost > 0) |
1124 | // dont remember where is money unit name to put here | 1124 | // // dont remember where is money unit name to put here |
1125 | str = "Upload complete. charged " + cost.ToString() + "$"; | 1125 | // str = "Upload complete. charged " + cost.ToString() + "$"; |
1126 | else | 1126 | // else |
1127 | str = "Upload complete"; | 1127 | // str = "Upload complete"; |
1128 | client.SendAgentAlertMessage(str, true); | 1128 | // client.SendAgentAlertMessage(str, true); |
1129 | } | 1129 | // } |
1130 | } | 1130 | } |
1131 | } | 1131 | } |
1132 | 1132 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index cc65981..d1a1583 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -104,9 +104,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
104 | 104 | ||
105 | if (m_workerThreads == null) | 105 | if (m_workerThreads == null) |
106 | { | 106 | { |
107 | m_workerThreads = new Thread[4]; | 107 | m_workerThreads = new Thread[2]; |
108 | 108 | ||
109 | for (uint i = 0; i < 4; i++) | 109 | for (uint i = 0; i < 2; i++) |
110 | { | 110 | { |
111 | m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests, | 111 | m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests, |
112 | String.Format("TextureWorkerThread{0}", i), | 112 | String.Format("TextureWorkerThread{0}", i), |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs index 413536d..0a5ad0f 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
104 | 104 | ||
105 | public void RegisterCaps(UUID agentID, Caps caps) | 105 | public void RegisterCaps(UUID agentID, Caps caps) |
106 | { | 106 | { |
107 | if (!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(agentID)) | 107 | if (!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(agentID) && !m_scene.Permissions.IsGod(agentID)) |
108 | return; | 108 | return; |
109 | 109 | ||
110 | UUID capID = UUID.Random(); | 110 | UUID capID = UUID.Random(); |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 0c067d7..edd9707 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | |||
@@ -164,8 +164,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
164 | // try child avatar second | 164 | // try child avatar second |
165 | foreach (Scene scene in m_Scenes) | 165 | foreach (Scene scene in m_Scenes) |
166 | { | 166 | { |
167 | m_log.DebugFormat( | 167 | //m_log.DebugFormat( |
168 | "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); | 168 | // "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName); |
169 | 169 | ||
170 | ScenePresence sp = scene.GetScenePresence(toAgentID); | 170 | ScenePresence sp = scene.GetScenePresence(toAgentID); |
171 | if (sp != null) | 171 | if (sp != null) |
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 | ||
diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs index 29fdda4..6e1a105 100644 --- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs | |||
@@ -1057,25 +1057,22 @@ namespace OpenSim.Region.Physics.Meshing | |||
1057 | mesh.RefCount++; | 1057 | mesh.RefCount++; |
1058 | return mesh; | 1058 | return mesh; |
1059 | } | 1059 | } |
1060 | } | ||
1061 | 1060 | ||
1062 | // try to find a identical mesh on meshs recently released | 1061 | // try to find a identical mesh on meshs recently released |
1063 | lock (m_uniqueReleasedMeshes) | 1062 | lock (m_uniqueReleasedMeshes) |
1064 | { | ||
1065 | m_uniqueReleasedMeshes.TryGetValue(key, out mesh); | ||
1066 | if (mesh != null) | ||
1067 | { | 1063 | { |
1068 | m_uniqueReleasedMeshes.Remove(key); | 1064 | m_uniqueReleasedMeshes.TryGetValue(key, out mesh); |
1069 | lock (m_uniqueMeshes) | 1065 | if (mesh != null) |
1070 | { | 1066 | { |
1067 | m_uniqueReleasedMeshes.Remove(key); | ||
1071 | try | 1068 | try |
1072 | { | 1069 | { |
1073 | m_uniqueMeshes.Add(key, mesh); | 1070 | m_uniqueMeshes.Add(key, mesh); |
1074 | } | 1071 | } |
1075 | catch { } | 1072 | catch { } |
1073 | mesh.RefCount = 1; | ||
1074 | return mesh; | ||
1076 | } | 1075 | } |
1077 | mesh.RefCount = 1; | ||
1078 | return mesh; | ||
1079 | } | 1076 | } |
1080 | } | 1077 | } |
1081 | return null; | 1078 | return null; |
@@ -1108,25 +1105,22 @@ namespace OpenSim.Region.Physics.Meshing | |||
1108 | mesh.RefCount++; | 1105 | mesh.RefCount++; |
1109 | return mesh; | 1106 | return mesh; |
1110 | } | 1107 | } |
1111 | } | ||
1112 | 1108 | ||
1113 | // try to find a identical mesh on meshs recently released | 1109 | // try to find a identical mesh on meshs recently released |
1114 | lock (m_uniqueReleasedMeshes) | 1110 | lock (m_uniqueReleasedMeshes) |
1115 | { | ||
1116 | m_uniqueReleasedMeshes.TryGetValue(key, out mesh); | ||
1117 | if (mesh != null) | ||
1118 | { | 1111 | { |
1119 | m_uniqueReleasedMeshes.Remove(key); | 1112 | m_uniqueReleasedMeshes.TryGetValue(key, out mesh); |
1120 | lock (m_uniqueMeshes) | 1113 | if (mesh != null) |
1121 | { | 1114 | { |
1115 | m_uniqueReleasedMeshes.Remove(key); | ||
1122 | try | 1116 | try |
1123 | { | 1117 | { |
1124 | m_uniqueMeshes.Add(key, mesh); | 1118 | m_uniqueMeshes.Add(key, mesh); |
1125 | } | 1119 | } |
1126 | catch { } | 1120 | catch { } |
1121 | mesh.RefCount = 1; | ||
1122 | return mesh; | ||
1127 | } | 1123 | } |
1128 | mesh.RefCount = 1; | ||
1129 | return mesh; | ||
1130 | } | 1124 | } |
1131 | } | 1125 | } |
1132 | 1126 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index adef0e6..82de06f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3795,6 +3795,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3795 | if (World.GetExtraSetting("auto_grant_attach_perms") == "true") | 3795 | if (World.GetExtraSetting("auto_grant_attach_perms") == "true") |
3796 | implicitPerms = ScriptBaseClass.PERMISSION_ATTACH; | 3796 | implicitPerms = ScriptBaseClass.PERMISSION_ATTACH; |
3797 | } | 3797 | } |
3798 | if (World.GetExtraSetting("auto_grant_all_perms") == "true") | ||
3799 | { | ||
3800 | implicitPerms = perm; | ||
3801 | } | ||
3798 | } | 3802 | } |
3799 | 3803 | ||
3800 | if ((perm & (~implicitPerms)) == 0) // Requested only implicit perms | 3804 | if ((perm & (~implicitPerms)) == 0) // Requested only implicit perms |