From 02fe05f346f3c4acad0116e702ed197a52b3fb4d Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 24 May 2013 00:41:47 +0100 Subject: [PATCH 1/2] Fix issue where llSetPayPrice on either one of a clone prim in the same OpenSimulator session would change the prices on both prims. This is because the PayPrice array refernence was being memberwise cloned and not the array itself. Addresses http://opensimulator.org/mantis/view.php?id=6639 --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b1c1cbb3ea..ea8c3c5c39 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1799,6 +1799,8 @@ namespace OpenSim.Region.Framework.Scenes Array.Copy(Shape.ExtraParams, extraP, extraP.Length); dupe.Shape.ExtraParams = extraP; + dupe.PayPrice = (int[])PayPrice.Clone(); + dupe.DynAttrs.CopyFrom(DynAttrs); if (userExposed) From eb2bd9d203dbc9d202ae62594fcbdb53d38031ac Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 24 May 2013 00:46:58 +0100 Subject: [PATCH 2/2] minor: Remove unnecessary duplication of AbsolutePosition Vector3 in SOG.Copy() As a struct, Vector3 has already been cloned by MemberwiseClone() --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 2d4218da39..df23cc5170 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1499,7 +1499,6 @@ namespace OpenSim.Region.Framework.Scenes if (!userExposed) dupe.IsAttachment = true; - dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); dupe.m_sittingAvatars = new List(); if (!userExposed)