From 79200ed27031f03fca9e7bfb7e04c93b4759fbe4 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 15 Feb 2014 17:10:20 -0800 Subject: 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. --- OpenSim/Region/Application/OpenSim.cs | 8 ++++---- OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 77b9440..3d80c6e 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -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); }); }); diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 0c4b79b..2e638d4 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -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) { -- cgit v1.1