From 45fcbaae1befb988608654505b1e7c275a189770 Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 13 Aug 2007 20:24:37 +0000
Subject: Added Scene.ConvertLocalIDToFullID() method.
---
OpenSim/Region/Environment/Scenes/Scene.cs | 18 ++++++++++++++++++
OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 10 ++++++++++
OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 6 +++++-
bin/OpenSimAssetSet.xml | 14 ++++++++++++++
4 files changed, 47 insertions(+), 1 deletion(-)
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
ScriptEngine.InitializeEngine(this);
}
#endregion
+
+ public LLUUID ConvertLocalIDToFullID(uint localID)
+ {
+ bool hasPrim = false;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObjectGroup)
+ {
+ hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
+ if (hasPrim != false)
+ {
+ return ((SceneObjectGroup)ent).GetPartsFullID(localID);
+ }
+ }
+ }
+
+ return null;
+ }
}
}
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
}
}
}
+
+ public LLUUID GetPartsFullID(uint localID)
+ {
+ SceneObjectPart part = this.GetChildPrim(localID);
+ if (part != null)
+ {
+ return part.UUID;
+ }
+ return null;
+ }
}
}
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
dupe.Acceleration = new LLVector3(0, 0, 0);
dupe.AngularVelocity = new LLVector3(0, 0, 0);
dupe.ObjectFlags = this.ObjectFlags;
- //TODO copy extraparams data and anything else not currently copied
+
+ byte[] extraP = new byte[this.Shape.ExtraParams.Length];
+ Array.Copy(this.Shape.ExtraParams, extraP, extraP.Length);
+ dupe.Shape.ExtraParams = extraP;
+
return dupe;
}
#endregion
diff --git a/bin/OpenSimAssetSet.xml b/bin/OpenSimAssetSet.xml
index d81b5b5..c3f061f 100644
--- a/bin/OpenSimAssetSet.xml
+++ b/bin/OpenSimAssetSet.xml
@@ -6,4 +6,18 @@
+
+
\ No newline at end of file
--
cgit v1.1