aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2011-10-12 00:50:13 +0200
committerMelanie2011-10-12 00:50:13 +0200
commit59e3ac1ec65d8168716d8cada5164952a0e576cf (patch)
treee751417c4a76220ae3a43591cf0c847ee745f12b /OpenSim/Region/CoreModules
parentMerge branch 'bigmerge' of ssh://3dhosting.de/var/git/careminster into bigmerge (diff)
downloadopensim-SC-59e3ac1ec65d8168716d8cada5164952a0e576cf.zip
opensim-SC-59e3ac1ec65d8168716d8cada5164952a0e576cf.tar.gz
opensim-SC-59e3ac1ec65d8168716d8cada5164952a0e576cf.tar.bz2
opensim-SC-59e3ac1ec65d8168716d8cada5164952a0e576cf.tar.xz
Fix rezzing coalesced object broken by core merge
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs90
1 files changed, 36 insertions, 54 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index dd6bdf7..e0f8240 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -786,10 +786,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
786 786
787 if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment)) 787 if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment))
788 return null; 788 return null;
789 SceneObjectPart rootPart = group.RootPart;
790 for (int i = 0; i < objlist.Count; i++) 789 for (int i = 0; i < objlist.Count; i++)
791 { 790 {
792 group = objlist[i]; 791 group = objlist[i];
792 SceneObjectPart rootPart = group.RootPart;
793 793
794// Vector3 storedPosition = group.AbsolutePosition; 794// Vector3 storedPosition = group.AbsolutePosition;
795 if (group.UUID == UUID.Zero) 795 if (group.UUID == UUID.Zero)
@@ -854,68 +854,50 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
854 rootPart.ScheduleFullUpdate(); 854 rootPart.ScheduleFullUpdate();
855 } 855 }
856 856
857// m_log.DebugFormat( 857 if ((rootPart.OwnerID != item.Owner) ||
858// "[InventoryAccessModule]: Rezzed {0} {1} {2} for {3}", 858 (item.CurrentPermissions & 16) != 0 || // Magic number
859// group.Name, group.LocalId, group.UUID, remoteClient.Name); 859 (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
860 }
861
862 group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
863 // TODO: Remove the magic number badness
864 if (item != null)
865 DoPostRezWhenFromItem(item, attachment);
866
867 if ((rootPart.OwnerID != item.Owner) ||
868 (item.CurrentPermissions & 16) != 0 || // Magic number
869 (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
870 {
871 //Need to kill the for sale here
872 rootPart.ObjectSaleType = 0;
873 rootPart.SalePrice = 10;
874
875 if (m_Scene.Permissions.PropagatePermissions())
876 { 860 {
877 foreach (SceneObjectPart part in group.Parts) 861 //Need to kill the for sale here
862 rootPart.ObjectSaleType = 0;
863 rootPart.SalePrice = 10;
864
865 if (m_Scene.Permissions.PropagatePermissions())
878 { 866 {
879 if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0) 867 foreach (SceneObjectPart part in group.Parts)
880 { 868 {
881 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) 869 if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0)
882 part.EveryoneMask = item.EveryOnePermissions; 870 {
883 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) 871 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
884 part.NextOwnerMask = item.NextPermissions; 872 part.EveryoneMask = item.EveryOnePermissions;
885 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) 873 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
886 part.GroupMask = item.GroupPermissions; 874 part.NextOwnerMask = item.NextPermissions;
875 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
876 part.GroupMask = item.GroupPermissions;
877 }
887 } 878 }
888 }
889 879
890 foreach (SceneObjectPart part in group.Parts) 880 foreach (SceneObjectPart part in group.Parts)
891 { 881 {
892 part.LastOwnerID = part.OwnerID; 882 part.LastOwnerID = part.OwnerID;
893 part.OwnerID = item.Owner; 883 part.OwnerID = item.Owner;
894 part.Inventory.ChangeInventoryOwner(item.Owner); 884 part.Inventory.ChangeInventoryOwner(item.Owner);
895 } 885 }
896 886
897 group.ApplyNextOwnerPermissions(); 887 group.ApplyNextOwnerPermissions();
888 }
898 } 889 }
899 }
900 foreach (SceneObjectPart part in group.Parts)
901 {
902 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
903 part.EveryoneMask = item.EveryOnePermissions;
904 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
905 part.NextOwnerMask = item.NextPermissions;
906 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
907 part.GroupMask = item.GroupPermissions;
908 }
909 890
910 if ((rootPart.OwnerID != item.Owner) || 891// m_log.DebugFormat(
911 (item.CurrentPermissions & 16) != 0 || // Magic number 892// "[InventoryAccessModule]: Rezzed {0} {1} {2} for {3}",
912 (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) 893// group.Name, group.LocalId, group.UUID, remoteClient.Name);
913 {
914 //Need to kill the for sale here
915 rootPart.ObjectSaleType = 0;
916 rootPart.SalePrice = 10;
917 } 894 }
918 895
896 group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
897 // TODO: Remove the magic number badness
898 if (item != null)
899 DoPostRezWhenFromItem(item, attachment);
900
919 return group; 901 return group;
920 } 902 }
921 903
@@ -1165,4 +1147,4 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1165 1147
1166 #endregion 1148 #endregion
1167 } 1149 }
1168} \ No newline at end of file 1150}