aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorTom2011-09-14 19:11:32 -0700
committerTom2011-09-14 19:11:32 -0700
commit5484c9b585a2a6289456e9492ac2989d489b555c (patch)
treec9b79199722fe09c993c237dce40febf731264e3 /OpenSim/Region/CoreModules/Framework
parentMerge fixes, and fix the build (diff)
parentDon't try and delete attachments for child agent close (diff)
downloadopensim-SC_OLD-5484c9b585a2a6289456e9492ac2989d489b555c.zip
opensim-SC_OLD-5484c9b585a2a6289456e9492ac2989d489b555c.tar.gz
opensim-SC_OLD-5484c9b585a2a6289456e9492ac2989d489b555c.tar.bz2
opensim-SC_OLD-5484c9b585a2a6289456e9492ac2989d489b555c.tar.xz
Bring us up to date.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs43
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs15
-rw-r--r--OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs8
3 files changed, 41 insertions, 25 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index faccab2..25d5e0e 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -59,7 +59,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
59 get { return m_MaxTransferDistance; } 59 get { return m_MaxTransferDistance; }
60 set { m_MaxTransferDistance = value; } 60 set { m_MaxTransferDistance = value; }
61 } 61 }
62
63 62
64 protected bool m_Enabled = false; 63 protected bool m_Enabled = false;
65 protected Scene m_aScene; 64 protected Scene m_aScene;
@@ -68,7 +67,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
68 private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions = 67 private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions =
69 new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>(); 68 new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>();
70 69
71
72 #region ISharedRegionModule 70 #region ISharedRegionModule
73 71
74 public Type ReplaceableInterface 72 public Type ReplaceableInterface
@@ -210,7 +208,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
210 sp.Teleport(position); 208 sp.Teleport(position);
211 209
212 foreach (SceneObjectGroup grp in sp.GetAttachments()) 210 foreach (SceneObjectGroup grp in sp.GetAttachments())
213 sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); 211 {
212 if (grp.IsDeleted)
213 sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
214 }
214 } 215 }
215 else // Another region possibly in another simulator 216 else // Another region possibly in another simulator
216 { 217 {
@@ -328,10 +329,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
328 sp.StandUp(); 329 sp.StandUp();
329 330
330 if (!sp.ValidateAttachments()) 331 if (!sp.ValidateAttachments())
331 { 332 m_log.DebugFormat(
332 sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); 333 "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for teleport of {0} from {1} to {2}. Continuing.",
333 return; 334 sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName);
334 } 335
336// if (!sp.ValidateAttachments())
337// {
338// sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
339// return;
340// }
335 341
336 string reason; 342 string reason;
337 string version; 343 string version;
@@ -955,7 +961,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
955 /// This Closes child agents on neighbouring regions 961 /// This Closes child agents on neighbouring regions
956 /// Calls an asynchronous method to do so.. so it doesn't lag the sim. 962 /// Calls an asynchronous method to do so.. so it doesn't lag the sim.
957 /// </summary> 963 /// </summary>
958 protected ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version) 964 protected ScenePresence CrossAgentToNewRegionAsync(
965 ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion,
966 bool isFlying, string version)
959 { 967 {
960 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 968 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
961 969
@@ -963,8 +971,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
963 971
964 Scene m_scene = agent.Scene; 972 Scene m_scene = agent.Scene;
965 973
966 if (neighbourRegion != null && agent.ValidateAttachments()) 974 if (neighbourRegion != null)
967 { 975 {
976 if (!agent.ValidateAttachments())
977 m_log.DebugFormat(
978 "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for region crossing of {0} from {1} to {2}. Continuing.",
979 agent.Name, agent.Scene.RegionInfo.RegionName, neighbourRegion.RegionName);
980
968 pos = pos + (agent.Velocity); 981 pos = pos + (agent.Velocity);
969 982
970 SetInTransit(agent.UUID); 983 SetInTransit(agent.UUID);
@@ -1789,16 +1802,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1789 List<SceneObjectGroup> m_attachments = sp.GetAttachments(); 1802 List<SceneObjectGroup> m_attachments = sp.GetAttachments();
1790 1803
1791 // Validate 1804 // Validate
1792 foreach (SceneObjectGroup gobj in m_attachments) 1805// foreach (SceneObjectGroup gobj in m_attachments)
1793 { 1806// {
1794 if (gobj == null || gobj.IsDeleted) 1807// if (gobj == null || gobj.IsDeleted)
1795 return false; 1808// return false;
1796 } 1809// }
1797 1810
1798 foreach (SceneObjectGroup gobj in m_attachments) 1811 foreach (SceneObjectGroup gobj in m_attachments)
1799 { 1812 {
1800 // If the prim group is null then something must have happened to it! 1813 // If the prim group is null then something must have happened to it!
1801 if (gobj != null) 1814 if (gobj != null && !gobj.IsDeleted)
1802 { 1815 {
1803 // Set the parent localID to 0 so it transfers over properly. 1816 // Set the parent localID to 0 so it transfers over properly.
1804 gobj.RootPart.SetParentLocalId(0); 1817 gobj.RootPart.SetParentLocalId(0);
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index a4bb40e..f05b090 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -726,8 +726,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
726 SceneObjectGroup group = null; 726 SceneObjectGroup group = null;
727 727
728 string xmlData = Utils.BytesToString(rezAsset.Data); 728 string xmlData = Utils.BytesToString(rezAsset.Data);
729 List<SceneObjectGroup> objlist = 729 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>();
730 new List<SceneObjectGroup>();
731 List<Vector3> veclist = new List<Vector3>(); 730 List<Vector3> veclist = new List<Vector3>();
732 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0); 731 byte bRayEndIsIntersection = (byte)(RayEndIsIntersection ? 1 : 0);
733 Vector3 pos; 732 Vector3 pos;
@@ -799,6 +798,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
799 m_log.Debug("[InventoryAccessModule]: Object has UUID.Zero! Position 3"); 798 m_log.Debug("[InventoryAccessModule]: Object has UUID.Zero! Position 3");
800 } 799 }
801 800
801 foreach (SceneObjectPart part in group.Parts)
802 {
803 // Make the rezzer the owner, as this is not necessarily set correctly in the serialized asset.
804 part.LastOwnerID = part.OwnerID;
805 part.OwnerID = remoteClient.AgentId;
806 }
807
802 if (!attachment) 808 if (!attachment)
803 { 809 {
804 // If it's rezzed in world, select it. Much easier to 810 // If it's rezzed in world, select it. Much easier to
@@ -839,7 +845,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
839 845
840 if (!attachment) 846 if (!attachment)
841 { 847 {
842 if (group.RootPart.Shape.PCode == (byte)PCode.Prim) 848 if (rootPart.Shape.PCode == (byte)PCode.Prim)
843 group.ClearPartAttachmentData(); 849 group.ClearPartAttachmentData();
844 850
845 // Fire on_rez 851 // Fire on_rez
@@ -1017,11 +1023,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1017 if ((part.OwnerID != item.Owner) || 1023 if ((part.OwnerID != item.Owner) ||
1018 (item.CurrentPermissions & 16) != 0) 1024 (item.CurrentPermissions & 16) != 0)
1019 { 1025 {
1020 part.LastOwnerID = part.OwnerID;
1021 part.OwnerID = item.Owner;
1022 part.Inventory.ChangeInventoryOwner(item.Owner); 1026 part.Inventory.ChangeInventoryOwner(item.Owner);
1023 part.GroupMask = 0; // DO NOT propagate here 1027 part.GroupMask = 0; // DO NOT propagate here
1024 } 1028 }
1029
1025 part.EveryoneMask = item.EveryOnePermissions; 1030 part.EveryoneMask = item.EveryOnePermissions;
1026 part.NextOwnerMask = item.NextPermissions; 1031 part.NextOwnerMask = item.NextPermissions;
1027 } 1032 }
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
index b0b35e4..bef0d69 100644
--- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs
@@ -87,8 +87,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
87 "Show the bindings between user UUIDs and user names", 87 "Show the bindings between user UUIDs and user names",
88 String.Empty, 88 String.Empty,
89 HandleShowUsers); 89 HandleShowUsers);
90
91
92 } 90 }
93 91
94 public bool IsSharedModule 92 public bool IsSharedModule
@@ -365,9 +363,9 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
365 lock (m_UserCache) 363 lock (m_UserCache)
366 m_UserCache[user.Id] = user; 364 m_UserCache[user.Id] = user;
367 365
368 m_log.DebugFormat( 366// m_log.DebugFormat(
369 "[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}", 367// "[USER MANAGEMENT MODULE]: Added user {0} {1} {2} {3}",
370 user.Id, user.FirstName, user.LastName, user.HomeURL); 368// user.Id, user.FirstName, user.LastName, user.HomeURL);
371 } 369 }
372 370
373 //public void AddUser(UUID uuid, string userData) 371 //public void AddUser(UUID uuid, string userData)