aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorlbsa712008-02-11 13:26:55 +0000
committerlbsa712008-02-11 13:26:55 +0000
commitc927928245fcd2c0b028029587d91b34ff145d91 (patch)
tree7aaa930f611e29d26e89f03408cc1a9151e703cd /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parentFrom: Ansgar Schmidt <ANSI@de.ibm.com> (diff)
downloadopensim-SC_OLD-c927928245fcd2c0b028029587d91b34ff145d91.zip
opensim-SC_OLD-c927928245fcd2c0b028029587d91b34ff145d91.tar.gz
opensim-SC_OLD-c927928245fcd2c0b028029587d91b34ff145d91.tar.bz2
opensim-SC_OLD-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/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs78
1 files changed, 28 insertions, 50 deletions
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()