diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
5 files changed, 35 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 95cc6b7..81a7278 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -482,13 +482,28 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
482 | attachPos = Vector3.Zero; | 482 | attachPos = Vector3.Zero; |
483 | } | 483 | } |
484 | 484 | ||
485 | // AttachmentPt 0 (default) means the client chose to 'wear' the attachment. | 485 | // if the attachment point is the same as previous, make sure we get the saved |
486 | // position info. | ||
487 | if (attachmentPt != 0 && attachmentPt == group.RootPart.Shape.LastAttachPoint) | ||
488 | { | ||
489 | attachPos = group.RootPart.AttachedPos; | ||
490 | } | ||
491 | |||
492 | // AttachmentPt 0 means the client chose to 'wear' the attachment. | ||
486 | if (attachmentPt == (uint)AttachmentPoint.Default) | 493 | if (attachmentPt == (uint)AttachmentPoint.Default) |
487 | { | 494 | { |
488 | // Check object for stored attachment point | 495 | // Check object for stored attachment point |
489 | attachmentPt = group.AttachmentPoint; | 496 | attachmentPt = group.AttachmentPoint; |
490 | } | 497 | } |
491 | 498 | ||
499 | // if we didn't find an attach point, look for where it was last attached | ||
500 | if (attachmentPt == 0) | ||
501 | { | ||
502 | attachmentPt = (uint)group.RootPart.Shape.LastAttachPoint; | ||
503 | attachPos = group.RootPart.AttachedPos; | ||
504 | group.HasGroupChanged = true; | ||
505 | } | ||
506 | |||
492 | // if we still didn't find a suitable attachment point....... | 507 | // if we still didn't find a suitable attachment point....... |
493 | if (attachmentPt == 0) | 508 | if (attachmentPt == 0) |
494 | { | 509 | { |
@@ -684,6 +699,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
684 | so.ClearPartAttachmentData(); | 699 | so.ClearPartAttachmentData(); |
685 | rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false); | 700 | rootPart.ApplyPhysics(rootPart.GetEffectiveObjectFlags(), rootPart.VolumeDetectActive,false); |
686 | so.HasGroupChanged = true; | 701 | so.HasGroupChanged = true; |
702 | so.RootPart.Shape.LastAttachPoint = (byte)so.AttachmentPoint; | ||
687 | rootPart.Rezzed = DateTime.Now; | 703 | rootPart.Rezzed = DateTime.Now; |
688 | rootPart.RemFlag(PrimFlags.TemporaryOnRez); | 704 | rootPart.RemFlag(PrimFlags.TemporaryOnRez); |
689 | so.AttachToBackup(); | 705 | so.AttachToBackup(); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 62acd78..f023e77 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -719,7 +719,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
719 | SceneObjectGroup rezzedAtt = presence.GetAttachments()[0]; | 719 | SceneObjectGroup rezzedAtt = presence.GetAttachments()[0]; |
720 | 720 | ||
721 | m_numberOfAttachEventsFired = 0; | 721 | m_numberOfAttachEventsFired = 0; |
722 | scene.IncomingCloseAgent(presence.UUID, false); | 722 | scene.CloseAgent(presence.UUID, false); |
723 | 723 | ||
724 | // Check that we can't retrieve this attachment from the scene. | 724 | // Check that we can't retrieve this attachment from the scene. |
725 | Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null); | 725 | Assert.That(scene.GetSceneObjectGroup(rezzedAtt.UUID), Is.Null); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs index 6b14fa6..adb838c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs | |||
@@ -276,7 +276,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods | |||
276 | if (sp.IsChildAgent) | 276 | if (sp.IsChildAgent) |
277 | return; | 277 | return; |
278 | sp.ControllingClient.Kick(reason); | 278 | sp.ControllingClient.Kick(reason); |
279 | sp.Scene.IncomingCloseAgent(sp.UUID, true); | 279 | sp.Scene.CloseAgent(sp.UUID, true); |
280 | } | 280 | } |
281 | 281 | ||
282 | private void OnIncomingInstantMessage(GridInstantMessage msg) | 282 | private void OnIncomingInstantMessage(GridInstantMessage msg) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index e285f21..03aaaac 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -149,8 +149,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
149 | private void OnInstantMessage(IClientAPI client, GridInstantMessage im) | 149 | private void OnInstantMessage(IClientAPI client, GridInstantMessage im) |
150 | { | 150 | { |
151 | // m_log.DebugFormat( | 151 | // m_log.DebugFormat( |
152 | // "[INVENTORY TRANSFER]: {0} IM type received from {1}", | 152 | // "[INVENTORY TRANSFER]: {0} IM type received from client {1}. From={2} ({3}), To={4}", |
153 | // (InstantMessageDialog)im.dialog, client.Name); | 153 | // (InstantMessageDialog)im.dialog, client.Name, |
154 | // im.fromAgentID, im.fromAgentName, im.toAgentID); | ||
154 | 155 | ||
155 | Scene scene = FindClientScene(client.AgentId); | 156 | Scene scene = FindClientScene(client.AgentId); |
156 | 157 | ||
@@ -467,9 +468,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
467 | /// <summary> | 468 | /// <summary> |
468 | /// | 469 | /// |
469 | /// </summary> | 470 | /// </summary> |
470 | /// <param name="msg"></param> | 471 | /// <param name="im"></param> |
471 | private void OnGridInstantMessage(GridInstantMessage im) | 472 | private void OnGridInstantMessage(GridInstantMessage im) |
472 | { | 473 | { |
474 | // Check if it's a type of message that we should handle | ||
475 | if (!((im.dialog == (byte) InstantMessageDialog.InventoryOffered) | ||
476 | || (im.dialog == (byte) InstantMessageDialog.InventoryAccepted) | ||
477 | || (im.dialog == (byte) InstantMessageDialog.InventoryDeclined) | ||
478 | || (im.dialog == (byte) InstantMessageDialog.TaskInventoryDeclined))) | ||
479 | return; | ||
480 | |||
481 | m_log.DebugFormat( | ||
482 | "[INVENTORY TRANSFER]: {0} IM type received from grid. From={1} ({2}), To={3}", | ||
483 | (InstantMessageDialog)im.dialog, im.fromAgentID, im.fromAgentName, im.toAgentID); | ||
484 | |||
473 | // Check if this is ours to handle | 485 | // Check if this is ours to handle |
474 | // | 486 | // |
475 | Scene scene = FindClientScene(new UUID(im.toAgentID)); | 487 | Scene scene = FindClientScene(new UUID(im.toAgentID)); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs index 0c64f19..c517a30 100644 --- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs | |||
@@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure | |||
165 | (uint)presence.AbsolutePosition.Y, | 165 | (uint)presence.AbsolutePosition.Y, |
166 | (uint)presence.AbsolutePosition.Z + 2); | 166 | (uint)presence.AbsolutePosition.Z + 2); |
167 | 167 | ||
168 | m_log.DebugFormat("TP invite with message {0}, type {1}", message, lureType); | 168 | m_log.DebugFormat("[LURE MODULE]: TP invite with message {0}, type {1}", message, lureType); |
169 | 169 | ||
170 | GridInstantMessage m; | 170 | GridInstantMessage m; |
171 | 171 | ||