aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2016-08-05 15:19:42 +0100
committerUbitUmarov2016-08-05 15:19:42 +0100
commit23578635df0c98f883f7be9b6e08a4fc1a7c834c (patch)
tree4d35657b01a00ce867c526157a3df592de4b7098 /OpenSim/Region/CoreModules
parentalso use group provided by viewer on ObjectDuplicateOnRay (diff)
downloadopensim-SC_OLD-23578635df0c98f883f7be9b6e08a4fc1a7c834c.zip
opensim-SC_OLD-23578635df0c98f883f7be9b6e08a4fc1a7c834c.tar.gz
opensim-SC_OLD-23578635df0c98f883f7be9b6e08a4fc1a7c834c.tar.bz2
opensim-SC_OLD-23578635df0c98f883f7be9b6e08a4fc1a7c834c.tar.xz
more changes relative to incorrect use of activegroupid
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs20
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs35
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs2
3 files changed, 45 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 4119f90..4d7c25b 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -306,9 +306,21 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
306 /// 306 ///
307 /// RezObject 307 /// RezObject
308 /// 308 ///
309 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart, 309 // compatibility do not use
310 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 310 public override SceneObjectGroup RezObject(
311 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 311 IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
312 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
313 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
314 {
315 return RezObject(remoteClient, itemID, UUID.Zero, RayEnd, RayStart,
316 RayTargetID, BypassRayCast, RayEndIsIntersection,
317 RezSelected, RemoveItem, fromTaskID, attachment);
318 }
319
320 public override SceneObjectGroup RezObject(IClientAPI remoteClient, UUID itemID,
321 UUID groupID, Vector3 RayEnd, Vector3 RayStart,
322 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
323 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
312 { 324 {
313 m_log.DebugFormat("[HGScene]: RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID); 325 m_log.DebugFormat("[HGScene]: RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID);
314 326
@@ -331,7 +343,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
331 //} 343 //}
332 344
333 // OK, we're done fetching. Pass it up to the default RezObject 345 // OK, we're done fetching. Pass it up to the default RezObject
334 SceneObjectGroup sog = base.RezObject(remoteClient, itemID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, 346 SceneObjectGroup sog = base.RezObject(remoteClient, itemID, groupID, RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
335 RezSelected, RemoveItem, fromTaskID, attachment); 347 RezSelected, RemoveItem, fromTaskID, attachment);
336 348
337 return sog; 349 return sog;
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 8c560e5..00e2670 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -818,12 +818,22 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
818 818
819 return item; 819 return item;
820 } 820 }
821 821 // compatibility do not use
822 public virtual SceneObjectGroup RezObject( 822 public virtual SceneObjectGroup RezObject(
823 IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart, 823 IClientAPI remoteClient, UUID itemID, Vector3 RayEnd, Vector3 RayStart,
824 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 824 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
825 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 825 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
826 { 826 {
827 return RezObject(remoteClient, itemID, UUID.Zero, RayEnd, RayStart,
828 RayTargetID, BypassRayCast, RayEndIsIntersection,
829 RezSelected, RemoveItem, fromTaskID, attachment);
830 }
831
832 public virtual SceneObjectGroup RezObject(
833 IClientAPI remoteClient, UUID itemID, UUID rezGroupID, Vector3 RayEnd, Vector3 RayStart,
834 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
835 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
836 {
827// m_log.DebugFormat("[INVENTORY ACCESS MODULE]: RezObject for {0}, item {1}", remoteClient.Name, itemID); 837// m_log.DebugFormat("[INVENTORY ACCESS MODULE]: RezObject for {0}, item {1}", remoteClient.Name, itemID);
828 InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID); 838 InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID);
829 839
@@ -835,16 +845,28 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
835 item.Owner = remoteClient.AgentId; 845 item.Owner = remoteClient.AgentId;
836 846
837 return RezObject( 847 return RezObject(
838 remoteClient, item, item.AssetID, 848 remoteClient, item, rezGroupID, item.AssetID,
839 RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection, 849 RayEnd, RayStart, RayTargetID, BypassRayCast, RayEndIsIntersection,
840 RezSelected, RemoveItem, fromTaskID, attachment); 850 RezSelected, RemoveItem, fromTaskID, attachment);
841 } 851 }
842 852 // compatility
843 public virtual SceneObjectGroup RezObject( 853 public virtual SceneObjectGroup RezObject(
844 IClientAPI remoteClient, InventoryItemBase item, UUID assetID, Vector3 RayEnd, Vector3 RayStart, 854 IClientAPI remoteClient, InventoryItemBase item, UUID assetID, Vector3 RayEnd, Vector3 RayStart,
845 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 855 UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
846 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) 856 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
847 { 857 {
858 return RezObject(remoteClient, item, UUID.Zero, assetID,
859 RayEnd, RayStart, RayTargetID,
860 BypassRayCast, RayEndIsIntersection,
861 RezSelected, RemoveItem, fromTaskID, attachment);
862 }
863
864 public virtual SceneObjectGroup RezObject(
865 IClientAPI remoteClient, InventoryItemBase item, UUID groupID, UUID assetID,
866 Vector3 RayEnd, Vector3 RayStart, UUID RayTargetID,
867 byte BypassRayCast, bool RayEndIsIntersection,
868 bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment)
869 {
848 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString()); 870 AssetBase rezAsset = m_Scene.AssetService.Get(assetID.ToString());
849 871
850 if (rezAsset == null) 872 if (rezAsset == null)
@@ -986,6 +1008,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
986 group.IsAttachment = true; 1008 group.IsAttachment = true;
987 } 1009 }
988 1010
1011 group.SetGroup(groupID, remoteClient);
1012
989 // If we're rezzing an attachment then don't ask 1013 // If we're rezzing an attachment then don't ask
990 // AddNewSceneObject() to update the client since 1014 // AddNewSceneObject() to update the client since
991 // we'll be doing that later on. Scheduling more than 1015 // we'll be doing that later on. Scheduling more than
@@ -995,12 +1019,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
995 m_Scene.AddNewSceneObject(group, true, false); 1019 m_Scene.AddNewSceneObject(group, true, false);
996 1020
997 if (!attachment) 1021 if (!attachment)
1022 {
998 group.AbsolutePosition = pos + veclist[i]; 1023 group.AbsolutePosition = pos + veclist[i];
999 1024
1000 group.SetGroup(remoteClient.ActiveGroupId, remoteClient);
1001
1002 if (!attachment)
1003 {
1004 // Fire on_rez 1025 // Fire on_rez
1005 group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1); 1026 group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1);
1006 rootPart.ParentGroup.ResumeScripts(); 1027 rootPart.ParentGroup.ResumeScripts();
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
index 172b864..b31d4df 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/InventoryAccessModuleTests.cs
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests
166 166
167 SceneObjectGroup so 167 SceneObjectGroup so
168 = m_iam.RezObject( 168 = m_iam.RezObject(
169 m_tc, item1Id, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false); 169 m_tc, item1Id, UUID.Zero, Vector3.Zero, Vector3.Zero, UUID.Zero, 1, false, false, false, UUID.Zero, false);
170 170
171 Assert.That(so, Is.Not.Null); 171 Assert.That(so, Is.Not.Null);
172 172