aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs43
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs5
4 files changed, 50 insertions, 21 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index 1d86646..2223aeb 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -776,21 +776,5 @@ namespace OpenSim.Region.Communications.OGS1
776 // Return Empty list (no friends) 776 // Return Empty list (no friends)
777 } 777 }
778 } 778 }
779
780 public void AddAttachment(LLUUID user, LLUUID item)
781 {
782 return;
783 }
784
785 public void RemoveAttachment(LLUUID user, LLUUID item)
786 {
787 return;
788 }
789
790 public List<LLUUID> GetAttachments(LLUUID user)
791 {
792 return new List<LLUUID>();
793 }
794
795 } 779 }
796} 780}
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 6695dbf..b98f2d6 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -380,7 +380,7 @@ namespace OpenSim.Region.Environment.Scenes
380 SceneObjectGroup group = (SceneObjectGroup)obj; 380 SceneObjectGroup group = (SceneObjectGroup)obj;
381 381
382 //group.DetachToGround(); 382 //group.DetachToGround();
383 DetachSingleAttachmentToInv(group.GetFromAssetID(),remoteClient); 383 m_parentScene.DetachSingleAttachmentToInv(group.GetFromAssetID(),remoteClient);
384 } 384 }
385 } 385 }
386 } 386 }
@@ -432,7 +432,7 @@ namespace OpenSim.Region.Environment.Scenes
432 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); 432 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero);
433 } 433 }
434 434
435 protected internal void RezSingleAttachment( 435 public SceneObjectGroup RezSingleAttachment(
436 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask) 436 IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask)
437 { 437 {
438 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, itemID, LLVector3.Zero, LLVector3.Zero, LLUUID.Zero, (byte)1, true, 438 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, itemID, LLVector3.Zero, LLVector3.Zero, LLUUID.Zero, (byte)1, true,
@@ -446,11 +446,12 @@ namespace OpenSim.Region.Environment.Scenes
446 AttachObject(remoteClient,objatt.LocalId,AttachmentPt,new LLQuaternion(0,0,0,1),objatt.AbsolutePosition); 446 AttachObject(remoteClient,objatt.LocalId,AttachmentPt,new LLQuaternion(0,0,0,1),objatt.AbsolutePosition);
447 objatt.ScheduleGroupForFullUpdate(); 447 objatt.ScheduleGroupForFullUpdate();
448 } 448 }
449 return objatt;
449 } 450 }
450 451
451 // What makes this method odd and unique is it tries to detach using an LLUUID.... Yay for standards. 452 // What makes this method odd and unique is it tries to detach using an LLUUID.... Yay for standards.
452 // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID?? 453 // To LocalId or LLUUID, *THAT* is the question. How now Brown LLUUID??
453 protected internal void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient) 454 public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient)
454 { 455 {
455 if (itemID == LLUUID.Zero) // If this happened, someone made a mistake.... 456 if (itemID == LLUUID.Zero) // If this happened, someone made a mistake....
456 return; 457 return;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 0148d76..784d04c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -2316,5 +2316,48 @@ namespace OpenSim.Region.Environment.Scenes
2316// 2316//
2317// imod.TestFunction(); 2317// imod.TestFunction();
2318// } 2318// }
2319
2320 public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID,
2321 uint AttachmentPt, uint ItemFlags, uint NextOwnerMask)
2322 {
2323 SceneObjectGroup att = m_innerScene.RezSingleAttachment(remoteClient, itemID, AttachmentPt, ItemFlags, NextOwnerMask);
2324
2325 if (att == null)
2326 {
2327 DetachSingleAttachmentToInv(itemID, remoteClient);
2328 return;
2329 }
2330
2331 if (att.RootPart != null)
2332 AttachmentPt = att.RootPart.AttachmentPoint;
2333
2334 ScenePresence presence;
2335 if(TryGetAvatar(remoteClient.AgentId, out presence))
2336 {
2337 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, att.GetFromAssetID());
2338 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>();
2339 if(ava != null)
2340 {
2341 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2342 }
2343
2344 }
2345 }
2346
2347 public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient)
2348 {
2349 ScenePresence presence;
2350 if(TryGetAvatar(remoteClient.AgentId, out presence))
2351 {
2352 presence.Appearance.DetachAttachment(itemID);
2353 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>();
2354 if(ava != null)
2355 {
2356 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2357 }
2358
2359 }
2360 m_innerScene.DetachSingleAttachmentToInv(itemID, remoteClient);
2361 }
2319 } 2362 }
2320} 2363}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 474f062..4564cf1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2109,8 +2109,8 @@ namespace OpenSim.Region.Environment.Scenes
2109 client.OnGrabUpdate += m_innerScene.MoveObject; 2109 client.OnGrabUpdate += m_innerScene.MoveObject;
2110 client.OnDeRezObject += DeRezObject; 2110 client.OnDeRezObject += DeRezObject;
2111 client.OnRezObject += RezObject; 2111 client.OnRezObject += RezObject;
2112 client.OnRezSingleAttachmentFromInv += m_innerScene.RezSingleAttachment; 2112 client.OnRezSingleAttachmentFromInv += RezSingleAttachment;
2113 client.OnDetachAttachmentIntoInv += m_innerScene.DetachSingleAttachmentToInv; 2113 client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv;
2114 client.OnObjectAttach += m_innerScene.AttachObject; 2114 client.OnObjectAttach += m_innerScene.AttachObject;
2115 client.OnObjectDetach += m_innerScene.DetachObject; 2115 client.OnObjectDetach += m_innerScene.DetachObject;
2116 client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest; 2116 client.OnNameFromUUIDRequest += CommsManager.HandleUUIDNameRequest;
@@ -3859,5 +3859,6 @@ namespace OpenSim.Region.Environment.Scenes
3859 //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); 3859 //Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
3860 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); 3860 client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
3861 } 3861 }
3862
3862 } 3863 }
3863} 3864}