aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs83
1 files changed, 76 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index c94bfd9..d8e2143 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -466,6 +466,18 @@ namespace OpenSim.Region.Environment.Scenes
466 LLObject.ObjectFlags.CreateSelected | 466 LLObject.ObjectFlags.CreateSelected |
467 LLObject.ObjectFlags.ObjectOwnerModify; 467 LLObject.ObjectFlags.ObjectOwnerModify;
468 468
469 if (!ParentGroup.m_scene.PermissionsMngr.BypassPermissions)
470 {
471 EveryoneMask = (uint)m_flags;
472 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOwner;
473 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectTransfer;
474 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectCopy;
475 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectModify;
476 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectMove;
477 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectAnyOwner;
478 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOfficer;
479 }
480
469 ScheduleFullUpdate(); 481 ScheduleFullUpdate();
470 } 482 }
471 483
@@ -503,6 +515,23 @@ namespace OpenSim.Region.Environment.Scenes
503 OffsetPosition = position; 515 OffsetPosition = position;
504 RotationOffset = rotation; 516 RotationOffset = rotation;
505 ObjectFlags = flags; 517 ObjectFlags = flags;
518
519 if (!ParentGroup.m_scene.PermissionsMngr.BypassPermissions)
520 {
521 EveryoneMask = (uint)m_flags;
522 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOwner;
523 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectTransfer;
524 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectCopy;
525 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectModify;
526 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectMove;
527 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectAnyOwner;
528 EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOfficer;
529 }
530 else
531 {
532 EveryoneMask = ObjectFlags;
533 }
534
506 bool UsePhysics = ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0); 535 bool UsePhysics = ((ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
507 doPhysicsPropertyUpdate(UsePhysics, true); 536 doPhysicsPropertyUpdate(UsePhysics, true);
508 ScheduleFullUpdate(); 537 ScheduleFullUpdate();
@@ -519,6 +548,23 @@ namespace OpenSim.Region.Environment.Scenes
519 { 548 {
520 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); 549 XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart));
521 SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); 550 SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader);
551
552 if (!newobject.ParentGroup.m_scene.PermissionsMngr.BypassPermissions)
553 {
554 newobject.EveryoneMask = newobject.ObjectFlags;
555 newobject.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOwner;
556 newobject.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectTransfer;
557 newobject.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectCopy;
558 newobject.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectModify;
559 newobject.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectMove;
560 newobject.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectAnyOwner;
561 newobject.EveryoneMask &= ~(uint)LLObject.ObjectFlags.ObjectYouOfficer;
562 }
563 else
564 {
565 newobject.EveryoneMask = newobject.ObjectFlags;
566 }
567
522 bool UsePhysics = ((newobject.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0); 568 bool UsePhysics = ((newobject.ObjectFlags & (uint)LLObject.ObjectFlags.Physics) != 0);
523 newobject.doPhysicsPropertyUpdate(UsePhysics, true); 569 newobject.doPhysicsPropertyUpdate(UsePhysics, true);
524 570
@@ -711,6 +757,9 @@ namespace OpenSim.Region.Environment.Scenes
711 { 757 {
712 //Console.WriteLine("Adding flag: " + ((LLObject.ObjectFlags) flag).ToString()); 758 //Console.WriteLine("Adding flag: " + ((LLObject.ObjectFlags) flag).ToString());
713 m_flags |= flag; 759 m_flags |= flag;
760 BaseMask |= (uint)flag;
761 GroupMask |= (uint)flag;
762 EveryoneMask |= (uint)flag;
714 } 763 }
715 uint currflag = (uint) m_flags; 764 uint currflag = (uint) m_flags;
716 //System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + m_flags.ToString()); 765 //System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + m_flags.ToString());
@@ -724,6 +773,9 @@ namespace OpenSim.Region.Environment.Scenes
724 { 773 {
725 //Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString()); 774 //Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString());
726 m_flags &= ~flag; 775 m_flags &= ~flag;
776 BaseMask &= ~(uint)flag;
777 GroupMask &= ~(uint)flag;
778 EveryoneMask &= ~(uint)flag;
727 } 779 }
728 //System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + m_flags.ToString()); 780 //System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + m_flags.ToString());
729 //ScheduleFullUpdate(); 781 //ScheduleFullUpdate();
@@ -1201,19 +1253,36 @@ namespace OpenSim.Region.Environment.Scenes
1201 } 1253 }
1202 break; 1254 break;
1203 } 1255 }
1256 }
1257 // If you can't edit it, send the base permissions minus the flag to edit
1258 if (!ParentGroup.m_scene.PermissionsMngr.BypassPermissions)
1259 {
1260 if (ParentGroup.m_scene.PermissionsMngr.CanEditObject(remoteClient.AgentId, this.ParentGroup.UUID))
1261 {
1262 //clientFlags = ObjectFlags &= ~(uint)LLObject.ObjectFlags.ObjectModify;
1263 //clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectMove;
1264 //clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.AllowInventoryDrop;
1265 //clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectTransfer;
1266 // Send EveryoneMask
1267 clientFlags = ObjectFlags;
1268
1269 }
1204 else 1270 else
1205 { 1271 {
1206 // If you can't edit it, send the base permissions minus the flag to edit 1272 clientFlags = ObjectFlags;
1207 if (!ParentGroup.m_scene.PermissionsMngr.CanEditObject(remoteClient.AgentId, this.ParentGroup.UUID)) 1273 if (!ParentGroup.m_scene.PermissionsMngr.AnyoneCanCopyPermission(remoteClient.AgentId, this.ParentGroup.UUID))
1208 { 1274 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectCopy;
1209 clientFlags = ObjectFlags &= ~(uint)LLObject.ObjectFlags.ObjectModify; 1275 if (!ParentGroup.m_scene.PermissionsMngr.AnyoneCanMovePermission(remoteClient.AgentId, this.ParentGroup.UUID))
1210 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectMove; 1276 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectMove;
1211 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.AllowInventoryDrop; 1277
1212 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectTransfer; 1278 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectModify;
1213 } 1279 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.AllowInventoryDrop;
1280 clientFlags = clientFlags &= ~(uint)LLObject.ObjectFlags.ObjectTransfer;
1281 clientFlags = EveryoneMask;
1214 } 1282 }
1215 } 1283 }
1216 1284
1285
1217 byte[] color = new byte[] { m_color.R, m_color.G, m_color.B, m_color.A }; 1286 byte[] color = new byte[] { m_color.R, m_color.G, m_color.B, m_color.A };
1218 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid, 1287 remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid,
1219 OwnerID, 1288 OwnerID,