diff options
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 6 |
3 files changed, 33 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8ee5856..4aa3c49 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1023,5 +1023,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
1023 | ScriptEngine.InitializeEngine(this); | 1023 | ScriptEngine.InitializeEngine(this); |
1024 | } | 1024 | } |
1025 | #endregion | 1025 | #endregion |
1026 | |||
1027 | public LLUUID ConvertLocalIDToFullID(uint localID) | ||
1028 | { | ||
1029 | bool hasPrim = false; | ||
1030 | foreach (EntityBase ent in Entities.Values) | ||
1031 | { | ||
1032 | if (ent is SceneObjectGroup) | ||
1033 | { | ||
1034 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); | ||
1035 | if (hasPrim != false) | ||
1036 | { | ||
1037 | return ((SceneObjectGroup)ent).GetPartsFullID(localID); | ||
1038 | } | ||
1039 | } | ||
1040 | } | ||
1041 | |||
1042 | return null; | ||
1043 | } | ||
1026 | } | 1044 | } |
1027 | } | 1045 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index ad7b906..4f98199 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -825,5 +825,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
825 | } | 825 | } |
826 | } | 826 | } |
827 | } | 827 | } |
828 | |||
829 | public LLUUID GetPartsFullID(uint localID) | ||
830 | { | ||
831 | SceneObjectPart part = this.GetChildPrim(localID); | ||
832 | if (part != null) | ||
833 | { | ||
834 | return part.UUID; | ||
835 | } | ||
836 | return null; | ||
837 | } | ||
828 | } | 838 | } |
829 | } | 839 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index c1348c7..09a864e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -300,7 +300,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
300 | dupe.Acceleration = new LLVector3(0, 0, 0); | 300 | dupe.Acceleration = new LLVector3(0, 0, 0); |
301 | dupe.AngularVelocity = new LLVector3(0, 0, 0); | 301 | dupe.AngularVelocity = new LLVector3(0, 0, 0); |
302 | dupe.ObjectFlags = this.ObjectFlags; | 302 | dupe.ObjectFlags = this.ObjectFlags; |
303 | //TODO copy extraparams data and anything else not currently copied | 303 | |
304 | byte[] extraP = new byte[this.Shape.ExtraParams.Length]; | ||
305 | Array.Copy(this.Shape.ExtraParams, extraP, extraP.Length); | ||
306 | dupe.Shape.ExtraParams = extraP; | ||
307 | |||
304 | return dupe; | 308 | return dupe; |
305 | } | 309 | } |
306 | #endregion | 310 | #endregion |