replace old Attachoffset by AttachedPos. Comented out possible merge

artifacts
avinationmerge
UbitUmarov 2014-07-20 01:15:33 +01:00
parent 5000a5c038
commit dc717303d4
5 changed files with 11 additions and 13 deletions

View File

@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// Restore attachment data after trip through the sim
if (objectGroup.RootPart.AttachPoint > 0)
{
inventoryStoredPosition = objectGroup.RootPart.AttachOffset;
inventoryStoredPosition = objectGroup.RootPart.AttachedPos;
inventoryStoredRotation = objectGroup.RootPart.AttachRotation;
}

View File

@ -2332,16 +2332,17 @@ namespace OpenSim.Region.Framework.Scenes
if (e == null || attachment) // Single
{
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData);
/*
if (!attachment)
{
g.RootPart.AttachPoint = g.RootPart.Shape.State;
g.RootPart.AttachOffset = g.AbsolutePosition;
g.RootPart.AttachedPos = 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));
bbox = g.GetAxisAlignedBoundingBox(out offsetHeight);
@ -2360,14 +2361,14 @@ namespace OpenSim.Region.Framework.Scenes
foreach (XmlNode n in groups)
{
SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
/*
g.RootPart.AttachPoint = g.RootPart.Shape.State;
g.RootPart.AttachOffset = g.AbsolutePosition;
g.RootPart.AttachedPos = 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);
XmlElement el = (XmlElement)n;

View File

@ -250,9 +250,6 @@ namespace OpenSim.Region.Framework.Scenes
[XmlIgnore]
public byte AttachPoint = 0;
[XmlIgnore]
public Vector3 AttachOffset = Vector3.Zero;
[XmlIgnore]
public Quaternion AttachRotation = Quaternion.Identity;

View File

@ -904,11 +904,11 @@ namespace OpenSim.Region.Framework.Scenes
for (int i = 0; i < objlist.Count; i++)
{
SceneObjectGroup group = objlist[i];
/*
group.RootPart.AttachPoint = group.RootPart.Shape.State;
group.RootPart.AttachOffset = group.AbsolutePosition;
group.RootPart.AttachedPos = group.AbsolutePosition;
group.RootPart.AttachRotation = group.GroupRotation;
*/
group.ResetIDs();
SceneObjectPart rootPart = group.GetPart(group.UUID);

View File

@ -12801,7 +12801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
group.RootPart.AttachPoint = group.RootPart.Shape.State;
group.RootPart.AttachOffset = group.AbsolutePosition;
group.RootPart.AttachedPos = group.AbsolutePosition;
group.ResetIDs();