aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs40
1 files changed, 38 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index f55c118..d8533b0 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -193,8 +193,41 @@ namespace OpenSim.Region.Environment.Scenes
193 /// <param name="childPrims"></param> 193 /// <param name="childPrims"></param>
194 public void LinkObjects(uint parentPrim, List<uint> childPrims) 194 public void LinkObjects(uint parentPrim, List<uint> childPrims)
195 { 195 {
196 196 SceneObject parenPrim = null;
197 foreach (EntityBase ent in Entities.Values)
198 {
199 if (ent is SceneObject)
200 {
201 if (((SceneObject)ent).rootLocalID == parentPrim)
202 {
203 parenPrim = (SceneObject)ent;
204 break;
205 }
206 }
207 }
197 208
209 List<SceneObject> children = new List<SceneObject>();
210 if (parenPrim != null)
211 {
212 for (int i = 0; i < childPrims.Count; i++)
213 {
214 foreach (EntityBase ent in Entities.Values)
215 {
216 if (ent is SceneObject)
217 {
218 if (((SceneObject)ent).rootLocalID == childPrims[i])
219 {
220 children.Add((SceneObject)ent);
221 }
222 }
223 }
224 }
225 }
226
227 foreach (SceneObject sceneObj in children)
228 {
229 parenPrim.AddNewChildPrims(sceneObj);
230 }
198 } 231 }
199 232
200 /// <summary> 233 /// <summary>
@@ -275,7 +308,10 @@ namespace OpenSim.Region.Environment.Scenes
275 { 308 {
276 if (this.Entities.ContainsKey(objectID)) 309 if (this.Entities.ContainsKey(objectID))
277 { 310 {
278 ((PrimitiveOld)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); 311 if (this.Entities[objectID] is SceneObject)
312 {
313 ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient);
314 }
279 } 315 }
280 } 316 }
281 317