From 36f7e96392cc5eb52e0b89edd567d088d0954fd3 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 19 Nov 2015 15:02:12 +0000 Subject: clean code a bit --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index b1de341..49a708b 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -953,6 +953,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } } + group.ResetIDs(); + if (!attachment) { // If it's rezzed in world, select it. Much easier to @@ -966,12 +968,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (rootPart.Shape.PCode == (byte)PCode.Prim) group.ClearPartAttachmentData(); } - - group.ResetIDs(); - - if (attachment) + else { -// group.RootPart.Flags |= PrimFlags.Phantom; group.IsAttachment = true; } @@ -983,14 +981,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // attachment properly. m_Scene.AddNewSceneObject(group, true, false); - // if attachment we set it's asset id so object updates - // can reflect that, if not, we set it's position in world. if (!attachment) - { - group.ScheduleGroupForFullUpdate(); - group.AbsolutePosition = pos + veclist[i]; - } group.SetGroup(remoteClient.ActiveGroupId, remoteClient); @@ -1000,7 +992,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1); rootPart.ParentGroup.ResumeScripts(); - rootPart.ScheduleFullUpdate(); + group.ScheduleGroupForFullUpdate(); } // m_log.DebugFormat( @@ -1010,7 +1002,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // remoteClient.Name); } - group.SetGroup(remoteClient.ActiveGroupId, remoteClient); +// group.SetGroup(remoteClient.ActiveGroupId, remoteClient); if (item != null) DoPostRezWhenFromItem(item, attachment); -- cgit v1.1