Fix displacement and location operations on legacy trees and grass in

the 'load oar' and 'scene' commands. Before they  were ignored but the
code now relies on the SOG.IsAttachment function for attachmentness.
0.8.0.3
Robert Adams 2014-02-15 17:10:20 -08:00
parent 7fc289c039
commit 79200ed270
2 changed files with 5 additions and 5 deletions

View File

@ -559,7 +559,7 @@ namespace OpenSim
{
scene.ForEachSOG(delegate(SceneObjectGroup sog)
{
if (sog.AttachmentPoint == 0)
if (!sog.IsAttachment)
{
sog.RootPart.UpdateRotation(rot * sog.GroupRotation);
Vector3 offset = sog.AbsolutePosition - center;
@ -588,7 +588,7 @@ namespace OpenSim
{
scene.ForEachSOG(delegate(SceneObjectGroup sog)
{
if (sog.AttachmentPoint == 0)
if (!sog.IsAttachment)
{
if (sog.RootPart.AbsolutePosition.Z < minZ)
minZ = sog.RootPart.AbsolutePosition.Z;
@ -600,7 +600,7 @@ namespace OpenSim
{
scene.ForEachSOG(delegate(SceneObjectGroup sog)
{
if (sog.AttachmentPoint == 0)
if (!sog.IsAttachment)
{
Vector3 tmpRootPos = sog.RootPart.AbsolutePosition;
tmpRootPos.Z -= minZ;
@ -640,7 +640,7 @@ namespace OpenSim
{
scene.ForEachSOG(delegate(SceneObjectGroup sog)
{
if (sog.AttachmentPoint == 0)
if (!sog.IsAttachment)
sog.UpdateGroupPosition(sog.AbsolutePosition + offset);
});
});

View File

@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
SceneObjectGroup sceneObject = serialiser.DeserializeGroupFromXml2(serialisedSceneObject);
// Happily this does not do much to the object since it hasn't been added to the scene yet
if (sceneObject.AttachmentPoint == 0)
if (!sceneObject.IsAttachment)
{
if (m_displacement != Vector3.Zero || m_rotation != 0f)
{