aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-10 10:55:57 +0000
committerTeravus Ovares2008-02-10 10:55:57 +0000
commit85a9834ed84f33d3610499914fa3168a8eebce6d (patch)
tree23b51c0c9e944a64a54428d6f684210e784f42a3 /OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
parentClean up logging calls using String.Format explicitly (diff)
downloadopensim-SC-85a9834ed84f33d3610499914fa3168a8eebce6d.zip
opensim-SC-85a9834ed84f33d3610499914fa3168a8eebce6d.tar.gz
opensim-SC-85a9834ed84f33d3610499914fa3168a8eebce6d.tar.bz2
opensim-SC-85a9834ed84f33d3610499914fa3168a8eebce6d.tar.xz
* A lot of ugly permissions updates.
** Created SendFullUpdateToAllClientsExcept(LLUUID) so that permission updates /appear/ to apply immediately ** Separated out the ObjectFlags and the Permission Flags. They're related but not the same ** Added a hack routine to add *back* the objectflags to the client flags because the client hates the way we're doing object permissions ** Updated the clientflags routine to properly tell the client when they can't edit admin objects (objects owned by the sim administrator) even when they're an estate manager(why? >.< argh!) ** Fixed a null sim administrator/estate manager/user from causing permissions to return false even when it should return true. ** Re-added ObjectModify hack to allow collaboration with the allow anyone to move checkbox until we get group permissions done.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs60
1 files changed, 55 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 0a9d21a..8c25dfa 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -44,7 +44,19 @@ namespace OpenSim.Region.Environment.Scenes
44{ 44{
45 // I don't really know where to put this except here. 45 // I don't really know where to put this except here.
46 // Can't access the OpenSim.Region.ScriptEngine.Common.LSL_BaseClass.Changed constants 46 // Can't access the OpenSim.Region.ScriptEngine.Common.LSL_BaseClass.Changed constants
47 47 [Flags]
48 public enum ExtraParamType
49 {
50 Something1 = 1,
51 Something2 = 2,
52 Something3 = 4,
53 Something4 = 8,
54 Flexible = 16,
55 Light = 32,
56 Sculpt = 48,
57 Something5 = 64,
58 Something6 = 128
59 }
48 [Flags] 60 [Flags]
49 public enum Changed : uint 61 public enum Changed : uint
50 { 62 {
@@ -1166,6 +1178,15 @@ namespace OpenSim.Region.Environment.Scenes
1166 1178
1167 public void UpdatePrimFlags(ushort type, bool inUse, byte[] data) 1179 public void UpdatePrimFlags(ushort type, bool inUse, byte[] data)
1168 { 1180 {
1181
1182
1183 //m_log.Info("TSomething1:" + ((type & (ushort)ExtraParamType.Something1) == (ushort)ExtraParamType.Something1));
1184 //m_log.Info("TSomething2:" + ((type & (ushort)ExtraParamType.Something2) == (ushort)ExtraParamType.Something2));
1185 //m_log.Info("TSomething3:" + ((type & (ushort)ExtraParamType.Something3) == (ushort)ExtraParamType.Something3));
1186 //m_log.Info("TSomething4:" + ((type & (ushort)ExtraParamType.Something4) == (ushort)ExtraParamType.Something4));
1187 //m_log.Info("TSomething5:" + ((type & (ushort)ExtraParamType.Something5) == (ushort)ExtraParamType.Something5));
1188 //m_log.Info("TSomething6:" + ((type & (ushort)ExtraParamType.Something6) == (ushort)ExtraParamType.Something6));
1189
1169 bool usePhysics = false; 1190 bool usePhysics = false;
1170 bool IsTemporary = false; 1191 bool IsTemporary = false;
1171 bool IsPhantom = false; 1192 bool IsPhantom = false;
@@ -1173,7 +1194,7 @@ namespace OpenSim.Region.Environment.Scenes
1173 bool wasUsingPhysics = ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0); 1194 bool wasUsingPhysics = ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) != 0);
1174 //bool IsLocked = false; 1195 //bool IsLocked = false;
1175 int i = 0; 1196 int i = 0;
1176 1197
1177 1198
1178 try 1199 try
1179 { 1200 {
@@ -1579,7 +1600,7 @@ namespace OpenSim.Region.Environment.Scenes
1579 //EveryoneMask |= (uint)57344; 1600 //EveryoneMask |= (uint)57344;
1580 } 1601 }
1581 //ScheduleFullUpdate(); 1602 //ScheduleFullUpdate();
1582 SendFullUpdateToAllClients(); 1603 SendFullUpdateToAllClientsExcept(AgentID);
1583 } 1604 }
1584 //Field 16 = NextownerMask 1605 //Field 16 = NextownerMask
1585 if (field == (byte) 16) 1606 if (field == (byte) 16)
@@ -1592,11 +1613,28 @@ namespace OpenSim.Region.Environment.Scenes
1592 { 1613 {
1593 NextOwnerMask |= mask; 1614 NextOwnerMask |= mask;
1594 } 1615 }
1616 SendFullUpdateToAllClientsExcept(AgentID);
1617 }
1618
1619 if (field == (byte)2)
1620 {
1621 if (addRemTF == (byte)0)
1622 {
1623 m_parentGroup.SetLocked(true);
1624 //OwnerMask &= ~mask;
1625 }
1626 else
1627 {
1628 m_parentGroup.SetLocked(false);
1629 //OwnerMask |= mask;
1630 }
1595 SendFullUpdateToAllClients(); 1631 SendFullUpdateToAllClients();
1632
1596 } 1633 }
1634
1597 } 1635 }
1598 } 1636 }
1599 1637
1600 #region Client Update Methods 1638 #region Client Update Methods
1601 1639
1602 public void AddFullUpdateToAllAvatars() 1640 public void AddFullUpdateToAllAvatars()
@@ -1607,7 +1645,19 @@ namespace OpenSim.Region.Environment.Scenes
1607 avatars[i].QueuePartForUpdate(this); 1645 avatars[i].QueuePartForUpdate(this);
1608 } 1646 }
1609 } 1647 }
1610 1648 public void SendFullUpdateToAllClientsExcept(LLUUID agentID)
1649 {
1650 List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
1651 for (int i = 0; i < avatars.Count; i++)
1652 {
1653 // Ugly reference :(
1654 if (avatars[i].UUID != agentID)
1655 {
1656 m_parentGroup.SendPartFullUpdate(avatars[i].ControllingClient, this,
1657 avatars[i].GenerateClientFlags(UUID));
1658 }
1659 }
1660 }
1611 public void AddFullUpdateToAvatar(ScenePresence presence) 1661 public void AddFullUpdateToAvatar(ScenePresence presence)
1612 { 1662 {
1613 presence.QueuePartForUpdate(this); 1663 presence.QueuePartForUpdate(this);