mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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.
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user