diff options
author | lbsa71 | 2008-02-11 13:26:55 +0000 |
---|---|---|
committer | lbsa71 | 2008-02-11 13:26:55 +0000 |
commit | c927928245fcd2c0b028029587d91b34ff145d91 (patch) | |
tree | 7aaa930f611e29d26e89f03408cc1a9151e703cd /OpenSim/Region/Environment/Scenes | |
parent | From: Ansgar Schmidt <ANSI@de.ibm.com> (diff) | |
download | opensim-SC-c927928245fcd2c0b028029587d91b34ff145d91.zip opensim-SC-c927928245fcd2c0b028029587d91b34ff145d91.tar.gz opensim-SC-c927928245fcd2c0b028029587d91b34ff145d91.tar.bz2 opensim-SC-c927928245fcd2c0b028029587d91b34ff145d91.tar.xz |
* some refactoring on permissions
* temporary re-introduced the weird 'flip-back' behaviour, but debugging it; will remove it if I don't find anything.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
4 files changed, 33 insertions, 55 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index fee1e66..16f15a2 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
199 | // Update item with new asset | 199 | // Update item with new asset |
200 | item.AssetID = asset.FullID; | 200 | item.AssetID = asset.FullID; |
201 | group.UpdateInventoryItem(item); | 201 | group.UpdateInventoryItem(item); |
202 | group.GetProperites(remoteClient); | 202 | group.GetProperties(remoteClient); |
203 | 203 | ||
204 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) | 204 | // Trigger rerunning of script (use TriggerRezScript event, see RezScript) |
205 | if (isScriptRunning) | 205 | if (isScriptRunning) |
@@ -520,7 +520,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
520 | if (group != null) | 520 | if (group != null) |
521 | { | 521 | { |
522 | int type = group.RemoveInventoryItem(localID, itemID); | 522 | int type = group.RemoveInventoryItem(localID, itemID); |
523 | group.GetProperites(remoteClient); | 523 | group.GetProperties(remoteClient); |
524 | if (type == 10) | 524 | if (type == 10) |
525 | { | 525 | { |
526 | EventManager.TriggerRemoveScript(localID, itemID); | 526 | EventManager.TriggerRemoveScript(localID, itemID); |
@@ -599,7 +599,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
599 | { | 599 | { |
600 | group.AddInventoryItem(remoteClient, localID, item, copyID); | 600 | group.AddInventoryItem(remoteClient, localID, item, copyID); |
601 | group.StartScript(localID, copyID); | 601 | group.StartScript(localID, copyID); |
602 | group.GetProperites(remoteClient); | 602 | group.GetProperties(remoteClient); |
603 | 603 | ||
604 | // m_log.Info( | 604 | // m_log.Info( |
605 | // String.Format("[PRIMINVENTORY]: " + | 605 | // String.Format("[PRIMINVENTORY]: " + |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 86f10d7..5071f9b 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
106 | { | 106 | { |
107 | if (((SceneObjectGroup) ent).LocalId == primLocalID) | 107 | if (((SceneObjectGroup) ent).LocalId == primLocalID) |
108 | { | 108 | { |
109 | ((SceneObjectGroup) ent).GetProperites(remoteClient); | 109 | ((SceneObjectGroup) ent).GetProperties(remoteClient); |
110 | ((SceneObjectGroup) ent).IsSelected = true; | 110 | ((SceneObjectGroup) ent).IsSelected = true; |
111 | LandManager.setPrimsTainted(); | 111 | LandManager.setPrimsTainted(); |
112 | break; | 112 | break; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 83f0c27..78e7868 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1078,7 +1078,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1078 | /// | 1078 | /// |
1079 | /// </summary> | 1079 | /// </summary> |
1080 | /// <param name="client"></param> | 1080 | /// <param name="client"></param> |
1081 | public void GetProperites(IClientAPI client) | 1081 | public void GetProperties(IClientAPI client) |
1082 | { | 1082 | { |
1083 | ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties); | 1083 | ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties); |
1084 | // TODO: don't create new blocks if recycling an old packet | 1084 | // TODO: don't create new blocks if recycling an old packet |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 06c0472..180ed51 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1577,65 +1577,43 @@ namespace OpenSim.Region.Environment.Scenes | |||
1577 | 1577 | ||
1578 | public void UpdatePermissions(LLUUID AgentID, byte field, uint localID, uint mask, byte addRemTF) | 1578 | public void UpdatePermissions(LLUUID AgentID, byte field, uint localID, uint mask, byte addRemTF) |
1579 | { | 1579 | { |
1580 | bool set = addRemTF == 1; | ||
1581 | |||
1580 | // Are we the owner? | 1582 | // Are we the owner? |
1581 | if (AgentID == OwnerID) | 1583 | if (AgentID == OwnerID) |
1582 | { | 1584 | { |
1583 | m_log.Info("[PERMISSIONS]: field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " + | 1585 | switch (field) |
1584 | addRemTF.ToString()); | ||
1585 | |||
1586 | //Field 8 = EveryoneMask | ||
1587 | if (field == (byte) 8) | ||
1588 | { | ||
1589 | m_log.Info("[PERMISSIONS]: Left over: " + (OwnerMask - EveryoneMask)); | ||
1590 | if (addRemTF == (byte) 0) | ||
1591 | { | ||
1592 | //EveryoneMask = (uint)0; | ||
1593 | EveryoneMask &= ~mask; | ||
1594 | //EveryoneMask &= ~(uint)57344; | ||
1595 | } | ||
1596 | else | ||
1597 | { | ||
1598 | //EveryoneMask = (uint)0; | ||
1599 | EveryoneMask |= mask; | ||
1600 | //EveryoneMask |= (uint)57344; | ||
1601 | } | ||
1602 | //ScheduleFullUpdate(); | ||
1603 | SendFullUpdateToAllClientsExcept(AgentID); | ||
1604 | } | ||
1605 | //Field 16 = NextownerMask | ||
1606 | if (field == (byte) 16) | ||
1607 | { | 1586 | { |
1608 | if (addRemTF == (byte) 0) | 1587 | case 2: |
1609 | { | 1588 | OwnerMask = ApplyMask(OwnerMask, set, mask); |
1610 | NextOwnerMask &= ~mask; | 1589 | break; |
1611 | } | 1590 | case 4: |
1612 | else | 1591 | GroupMask = ApplyMask(GroupMask, set, mask); |
1613 | { | 1592 | break; |
1614 | NextOwnerMask |= mask; | 1593 | case 8: |
1615 | } | 1594 | EveryoneMask = ApplyMask(EveryoneMask, set, mask); |
1616 | SendFullUpdateToAllClientsExcept(AgentID); | 1595 | break; |
1596 | case 16: | ||
1597 | NextOwnerMask = ApplyMask(NextOwnerMask, set, mask); | ||
1598 | break; | ||
1617 | } | 1599 | } |
1618 | 1600 | ||
1619 | if (field == (byte)2) | 1601 | ScheduleFullUpdate(); |
1620 | { | 1602 | } |
1621 | if (addRemTF == (byte)0) | 1603 | } |
1622 | { | ||
1623 | //m_parentGroup.SetLocked(true); | ||
1624 | //PermissionMask. | ||
1625 | OwnerMask &= ~mask; | ||
1626 | } | ||
1627 | else | ||
1628 | { | ||
1629 | //m_parentGroup.SetLocked(false); | ||
1630 | OwnerMask |= mask; | ||
1631 | } | ||
1632 | SendFullUpdateToAllClients(); | ||
1633 | |||
1634 | } | ||
1635 | 1604 | ||
1605 | private uint ApplyMask(uint val, bool set, uint mask) | ||
1606 | { | ||
1607 | if (set) | ||
1608 | { | ||
1609 | return val |= mask; | ||
1610 | } | ||
1611 | else | ||
1612 | { | ||
1613 | return val &= ~mask; | ||
1636 | } | 1614 | } |
1637 | } | 1615 | } |
1638 | 1616 | ||
1639 | #region Client Update Methods | 1617 | #region Client Update Methods |
1640 | 1618 | ||
1641 | public void AddFullUpdateToAllAvatars() | 1619 | public void AddFullUpdateToAllAvatars() |