aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-27 14:37:51 +0000
committerTeravus Ovares2008-04-27 14:37:51 +0000
commitf71871bca3f2a6a3b49634963c6754b2acba27cd (patch)
tree63fd08f44d1787c1dd1af63009a49f433a7dad91 /OpenSim/Region/Environment/Scenes/InnerScene.cs
parentThank you Melanie for implementing (diff)
downloadopensim-SC-f71871bca3f2a6a3b49634963c6754b2acba27cd.zip
opensim-SC-f71871bca3f2a6a3b49634963c6754b2acba27cd.tar.gz
opensim-SC-f71871bca3f2a6a3b49634963c6754b2acba27cd.tar.bz2
opensim-SC-f71871bca3f2a6a3b49634963c6754b2acba27cd.tar.xz
* More attachment stuff, reworked some of the inventory routines to be what I need them to be for attachments.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index cbe5798..e76cf70 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -322,6 +322,22 @@ namespace OpenSim.Region.Environment.Scenes
322 // Calls attach with a Zero position 322 // Calls attach with a Zero position
323 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero); 323 AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero);
324 } 324 }
325 public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,
326 uint ItemFlags, uint NextOwnerMask)
327 {
328 SceneObjectGroup objatt = m_parentScene.RezObject(remoteClient, itemID, LLVector3.Zero, LLVector3.Zero, LLUUID.Zero, (byte)1, true,
329 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer),
330 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer),
331 (uint)(PermissionMask.Copy | PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer),
332 ItemFlags, false, false, remoteClient.AgentId, true);
333
334 if (objatt != null)
335 {
336 AttachObject(remoteClient,objatt.LocalId,AttachmentPt,new LLQuaternion(0,0,0,1),objatt.AbsolutePosition);
337 objatt.ScheduleGroupForFullUpdate();
338 }
339
340 }
325 341
326 public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot, LLVector3 attachPos) 342 public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot, LLVector3 attachPos)
327 { 343 {
@@ -338,14 +354,25 @@ namespace OpenSim.Region.Environment.Scenes
338 // Check object for stored attachment point 354 // Check object for stored attachment point
339 AttachmentPt = (uint)group.GetAttachmentPoint(); 355 AttachmentPt = (uint)group.GetAttachmentPoint();
340 356
357
341 // if we still didn't find a suitable attachment point....... 358 // if we still didn't find a suitable attachment point.......
342 if (AttachmentPt == 0) 359 if (AttachmentPt == 0)
343 { 360 {
344 AttachmentPt = (uint)AttachmentPoint.LeftHand; 361 AttachmentPt = (uint)AttachmentPoint.LeftHand;
362 attachPos = LLVector3.Zero;
345 } 363 }
346 364
365
347 } 366 }
348 367
368 // Saves and gets assetID
369 if (group.GetFromAssetID() == LLUUID.Zero)
370 {
371 LLUUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId);
372
373 // sets assetID so client can show asset as 'attached' in inventory
374 group.SetFromAssetID(newAssetID);
375 }
349 group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos); 376 group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos);
350 377
351 } 378 }