Bug fix on attachments: attach->drop->attach works now.

soprefactor
Diva Canto 2010-06-09 12:51:24 -07:00
parent 2a71df1285
commit e80cb815df
2 changed files with 30 additions and 21 deletions

View File

@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
@ -72,6 +73,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{
m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject");
try
{
// If we can't take it, we can't attach it!
SceneObjectPart part = m_scene.GetSceneObjectPart(objectLocalID);
if (part == null)
@ -97,6 +100,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
}
}
}
catch (Exception e)
{
m_log.DebugFormat("[ATTACHMENTS MODULE]: exception upon Attach Object {0}", e);
}
}
public bool AttachObject(
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent)

View File

@ -1052,6 +1052,7 @@ namespace OpenSim.Region.Framework.Scenes
return;
detachedpos = avatar.AbsolutePosition;
RootPart.FromItemID = UUID.Zero;
AbsolutePosition = detachedpos;
m_rootPart.AttachedAvatar = UUID.Zero;