fix attachments

avinationmerge
UbitUmarov 2014-07-19 20:27:05 +01:00 committed by Melanie Thielker
parent 159fcbf150
commit 95b89dd450
1 changed files with 9 additions and 7 deletions

View File

@ -2332,13 +2332,15 @@ namespace OpenSim.Region.Framework.Scenes
if (e == null || attachment) // Single
{
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
g.RootPart.AttachPoint = g.RootPart.Shape.State;
g.RootPart.AttachOffset = g.AbsolutePosition;
g.RootPart.AttachRotation = g.GroupRotation;
if (g.RootPart.Shape.PCode != (byte)PCode.NewTree &&
g.RootPart.Shape.PCode != (byte)PCode.Tree)
g.RootPart.Shape.State = 0;
if (!attachment)
{
g.RootPart.AttachPoint = g.RootPart.Shape.State;
g.RootPart.AttachOffset = g.AbsolutePosition;
g.RootPart.AttachRotation = g.GroupRotation;
if (g.RootPart.Shape.PCode != (byte)PCode.NewTree &&
g.RootPart.Shape.PCode != (byte)PCode.Tree)
g.RootPart.Shape.State = 0;
}
objlist.Add(g);
veclist.Add(new Vector3(0, 0, 0));