aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2012-05-30 00:50:47 +0200
committerMelanie2012-05-30 00:50:47 +0200
commit4358bb8f850863aec8a519c6f533c298630dc1af (patch)
tree28cf0ae831bc5eaf2e0813ab740847def9188fef /OpenSim/Region/CoreModules
parent fix physics not reporting collisions only with terrain (diff)
downloadopensim-SC_OLD-4358bb8f850863aec8a519c6f533c298630dc1af.zip
opensim-SC_OLD-4358bb8f850863aec8a519c6f533c298630dc1af.tar.gz
opensim-SC_OLD-4358bb8f850863aec8a519c6f533c298630dc1af.tar.bz2
opensim-SC_OLD-4358bb8f850863aec8a519c6f533c298630dc1af.tar.xz
Fix the log standing attach-from-world bug.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs51
1 files changed, 27 insertions, 24 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 78ae5e9..d7c7283 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -631,19 +631,19 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
631 // "[ATTACHMENTS MODULE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2}", 631 // "[ATTACHMENTS MODULE]: Called AddSceneObjectAsAttachment for object {0} {1} for {2}",
632 // grp.Name, grp.LocalId, remoteClient.Name); 632 // grp.Name, grp.LocalId, remoteClient.Name);
633 633
634 Vector3 inventoryStoredPosition = new Vector3 634// Vector3 inventoryStoredPosition = new Vector3
635 (((grp.AbsolutePosition.X > (int)Constants.RegionSize) 635// (((grp.AbsolutePosition.X > (int)Constants.RegionSize)
636 ? (float)Constants.RegionSize - 6 636// ? (float)Constants.RegionSize - 6
637 : grp.AbsolutePosition.X) 637// : grp.AbsolutePosition.X)
638 , 638// ,
639 (grp.AbsolutePosition.Y > (int)Constants.RegionSize) 639// (grp.AbsolutePosition.Y > (int)Constants.RegionSize)
640 ? (float)Constants.RegionSize - 6 640// ? (float)Constants.RegionSize - 6
641 : grp.AbsolutePosition.Y, 641// : grp.AbsolutePosition.Y,
642 grp.AbsolutePosition.Z); 642// grp.AbsolutePosition.Z);
643 643//
644 Vector3 originalPosition = grp.AbsolutePosition; 644// Vector3 originalPosition = grp.AbsolutePosition;
645 645//
646 grp.AbsolutePosition = inventoryStoredPosition; 646// grp.AbsolutePosition = inventoryStoredPosition;
647 647
648 // If we're being called from a script, then trying to serialize that same script's state will not complete 648 // If we're being called from a script, then trying to serialize that same script's state will not complete
649 // in any reasonable time period. Therefore, we'll avoid it. The worst that can happen is that if 649 // in any reasonable time period. Therefore, we'll avoid it. The worst that can happen is that if
@@ -651,7 +651,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
651 // without state on relog. Arguably, this is what we want anyway. 651 // without state on relog. Arguably, this is what we want anyway.
652 string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, false); 652 string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp, false);
653 653
654 grp.AbsolutePosition = originalPosition; 654// grp.AbsolutePosition = originalPosition;
655 655
656 AssetBase asset = m_scene.CreateAsset( 656 AssetBase asset = m_scene.CreateAsset(
657 grp.GetPartName(grp.LocalId), 657 grp.GetPartName(grp.LocalId),
@@ -679,21 +679,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
679 else // oopsies 679 else // oopsies
680 item.Folder = UUID.Zero; 680 item.Folder = UUID.Zero;
681 681
682 // Nix the special bits we used to use for slam and the folded perms
683 uint allowablePermissionsMask = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move);
684
682 if ((sp.UUID != grp.RootPart.OwnerID) && m_scene.Permissions.PropagatePermissions()) 685 if ((sp.UUID != grp.RootPart.OwnerID) && m_scene.Permissions.PropagatePermissions())
683 { 686 {
684 item.BasePermissions = grp.RootPart.NextOwnerMask; 687 item.BasePermissions = grp.RootPart.BaseMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
685 item.CurrentPermissions = grp.RootPart.NextOwnerMask; 688 item.CurrentPermissions = grp.RootPart.BaseMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
686 item.NextPermissions = grp.RootPart.NextOwnerMask; 689 item.NextPermissions = grp.RootPart.NextOwnerMask & allowablePermissionsMask;
687 item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask; 690 item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
688 item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask; 691 item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask & allowablePermissionsMask;
689 } 692 }
690 else 693 else
691 { 694 {
692 item.BasePermissions = grp.RootPart.BaseMask; 695 item.BasePermissions = grp.RootPart.BaseMask & allowablePermissionsMask;
693 item.CurrentPermissions = grp.RootPart.OwnerMask; 696 item.CurrentPermissions = grp.RootPart.OwnerMask & allowablePermissionsMask;
694 item.NextPermissions = grp.RootPart.NextOwnerMask; 697 item.NextPermissions = grp.RootPart.NextOwnerMask & allowablePermissionsMask;
695 item.EveryOnePermissions = grp.RootPart.EveryoneMask; 698 item.EveryOnePermissions = grp.RootPart.EveryoneMask & allowablePermissionsMask;
696 item.GroupPermissions = grp.RootPart.GroupMask; 699 item.GroupPermissions = grp.RootPart.GroupMask & allowablePermissionsMask;
697 } 700 }
698 item.CreationDate = Util.UnixTimeSinceEpoch(); 701 item.CreationDate = Util.UnixTimeSinceEpoch();
699 702