aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs82
1 files changed, 74 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 669039f..0927903 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -233,7 +233,19 @@ namespace OpenSim.Region.Environment.Scenes
233 /// <param name="shapeBlock"></param> 233 /// <param name="shapeBlock"></param>
234 public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) 234 public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
235 { 235 {
236 236 Primitive prim = null;
237 foreach (EntityBase ent in Entities.Values)
238 {
239 if (ent is SceneObject)
240 {
241 prim = ((SceneObject)ent).HasChildPrim(primLocalID);
242 if (prim != null)
243 {
244 prim.UpdateShape(shapeBlock);
245 break;
246 }
247 }
248 }
237 } 249 }
238 250
239 /// <summary> 251 /// <summary>
@@ -263,7 +275,7 @@ namespace OpenSim.Region.Environment.Scenes
263 /// <param name="description"></param> 275 /// <param name="description"></param>
264 public void PrimDescription(uint primLocalID, string description) 276 public void PrimDescription(uint primLocalID, string description)
265 { 277 {
266 Primitive prim = null; 278 Primitive prim = null;
267 foreach (EntityBase ent in Entities.Values) 279 foreach (EntityBase ent in Entities.Values)
268 { 280 {
269 if (ent is SceneObject) 281 if (ent is SceneObject)
@@ -271,7 +283,7 @@ namespace OpenSim.Region.Environment.Scenes
271 prim = ((SceneObject)ent).HasChildPrim(primLocalID); 283 prim = ((SceneObject)ent).HasChildPrim(primLocalID);
272 if (prim != null) 284 if (prim != null)
273 { 285 {
274 prim.Description = description; 286 prim.Description = description;
275 break; 287 break;
276 } 288 }
277 } 289 }
@@ -341,12 +353,41 @@ namespace OpenSim.Region.Environment.Scenes
341 /// <param name="remoteClient"></param> 353 /// <param name="remoteClient"></param>
342 public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 354 public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
343 { 355 {
344 foreach (Entity ent in Entities.Values) 356 Primitive prim = null;
357 foreach (EntityBase ent in Entities.Values)
345 { 358 {
346 if (ent.LocalId == localID) 359 if (ent is SceneObject)
347 { 360 {
348 ((PrimitiveOld)ent).UpdatePosition(pos); 361 prim = ((SceneObject)ent).HasChildPrim(localID);
349 break; 362 if (prim != null)
363 {
364 prim.UpdatePosition(pos);
365 break;
366 }
367 }
368 }
369 }
370
371 /// <summary>
372 ///
373 /// </summary>
374 /// <param name="localID"></param>
375 /// <param name="pos"></param>
376 /// <param name="rot"></param>
377 /// <param name="remoteClient"></param>
378 public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient)
379 {
380 Primitive prim = null;
381 foreach (EntityBase ent in Entities.Values)
382 {
383 if (ent is SceneObject)
384 {
385 prim = ((SceneObject)ent).HasChildPrim(localID);
386 if (prim != null)
387 {
388 prim.UpdateGroupMouseRotation( pos, rot);
389 break;
390 }
350 } 391 }
351 } 392 }
352 } 393 }
@@ -359,7 +400,19 @@ namespace OpenSim.Region.Environment.Scenes
359 /// <param name="remoteClient"></param> 400 /// <param name="remoteClient"></param>
360 public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 401 public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
361 { 402 {
362 403 Primitive prim = null;
404 foreach (EntityBase ent in Entities.Values)
405 {
406 if (ent is SceneObject)
407 {
408 prim = ((SceneObject)ent).HasChildPrim(localID);
409 if (prim != null)
410 {
411 prim.UpdateRotation(rot);
412 break;
413 }
414 }
415 }
363 } 416 }
364 417
365 /// <summary> 418 /// <summary>
@@ -370,6 +423,19 @@ namespace OpenSim.Region.Environment.Scenes
370 /// <param name="remoteClient"></param> 423 /// <param name="remoteClient"></param>
371 public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 424 public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
372 { 425 {
426 Primitive prim = null;
427 foreach (EntityBase ent in Entities.Values)
428 {
429 if (ent is SceneObject)
430 {
431 prim = ((SceneObject)ent).HasChildPrim(localID);
432 if (prim != null)
433 {
434 prim.ResizeGoup(scale);
435 break;
436 }
437 }
438 }
373 } 439 }
374 440
375 /// <summary> 441 /// <summary>