diff options
author | Justin Clark-Casey (justincc) | 2011-08-27 00:15:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-27 00:15:21 +0100 |
commit | 33a894f3d2cc95a7a512b86f39f3c6a6afabb015 (patch) | |
tree | 064edbd623ea0bd7bb85c29dc28d2348feb8454b /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |
parent | refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar (diff) | |
download | opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.zip opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.gz opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.bz2 opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.xz |
refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 3e1cb02..b976020 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -369,11 +369,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
369 | SceneObjectGroup att, ScenePresence sp, UUID itemID, uint AttachmentPt) | 369 | SceneObjectGroup att, ScenePresence sp, UUID itemID, uint AttachmentPt) |
370 | { | 370 | { |
371 | // m_log.DebugFormat( | 371 | // m_log.DebugFormat( |
372 | // "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})", | 372 | // "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} {2} (item ID {3}) at {4}", |
373 | // remoteClient.Name, att.Name, itemID); | 373 | // sp.Name, att.Name, att.LocalId, itemID, AttachmentPt); |
374 | 374 | ||
375 | if (!att.IsDeleted) | 375 | if (!att.IsDeleted) |
376 | AttachmentPt = att.RootPart.AttachmentPoint; | 376 | AttachmentPt = att.AttachmentPoint; |
377 | 377 | ||
378 | InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID); | 378 | InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID); |
379 | item = m_scene.InventoryService.GetItem(item); | 379 | item = m_scene.InventoryService.GetItem(item); |
@@ -547,7 +547,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
547 | ); | 547 | ); |
548 | 548 | ||
549 | group.RootPart.SetParentLocalId(0); | 549 | group.RootPart.SetParentLocalId(0); |
550 | group.RootPart.IsAttachment = false; | 550 | group.IsAttachment = false; |
551 | group.AbsolutePosition = group.RootPart.AttachedPos; | 551 | group.AbsolutePosition = group.RootPart.AttachedPos; |
552 | 552 | ||
553 | UpdateKnownItem(sp.ControllingClient, group, group.GetFromItemID(), group.OwnerID); | 553 | UpdateKnownItem(sp.ControllingClient, group, group.GetFromItemID(), group.OwnerID); |
@@ -569,7 +569,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
569 | // Finally, we restore the object's attachment status. | 569 | // Finally, we restore the object's attachment status. |
570 | byte attachmentPoint = sog.GetAttachmentPoint(); | 570 | byte attachmentPoint = sog.GetAttachmentPoint(); |
571 | sog.UpdateGroupPosition(pos); | 571 | sog.UpdateGroupPosition(pos); |
572 | sog.RootPart.IsAttachment = false; | 572 | sog.IsAttachment = false; |
573 | sog.AbsolutePosition = sog.RootPart.AttachedPos; | 573 | sog.AbsolutePosition = sog.RootPart.AttachedPos; |
574 | sog.SetAttachmentPoint(attachmentPoint); | 574 | sog.SetAttachmentPoint(attachmentPoint); |
575 | sog.HasGroupChanged = true; | 575 | sog.HasGroupChanged = true; |
@@ -666,8 +666,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
666 | 666 | ||
667 | so.AbsolutePosition = attachOffset; | 667 | so.AbsolutePosition = attachOffset; |
668 | so.RootPart.AttachedPos = attachOffset; | 668 | so.RootPart.AttachedPos = attachOffset; |
669 | so.RootPart.IsAttachment = true; | 669 | so.IsAttachment = true; |
670 | |||
671 | so.RootPart.SetParentLocalId(avatar.LocalId); | 670 | so.RootPart.SetParentLocalId(avatar.LocalId); |
672 | so.SetAttachmentPoint(Convert.ToByte(attachmentpoint)); | 671 | so.SetAttachmentPoint(Convert.ToByte(attachmentpoint)); |
673 | 672 | ||