From bd8018fa1cb32aa42e2a1a41ebb01fc0f1b0a04b Mon Sep 17 00:00:00 2001
From: MW
Date: Tue, 3 Jul 2007 20:10:20 +0000
Subject: Today's work on Building support/tools. Think I am slowly getting
there.
---
.../Environment/Scenes/Scene.PacketHandlers.cs | 82 +++++++++++++++++++---
1 file changed, 74 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
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
///
public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock)
{
-
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObject)
+ {
+ prim = ((SceneObject)ent).HasChildPrim(primLocalID);
+ if (prim != null)
+ {
+ prim.UpdateShape(shapeBlock);
+ break;
+ }
+ }
+ }
}
///
@@ -263,7 +275,7 @@ namespace OpenSim.Region.Environment.Scenes
///
public void PrimDescription(uint primLocalID, string description)
{
- Primitive prim = null;
+ Primitive prim = null;
foreach (EntityBase ent in Entities.Values)
{
if (ent is SceneObject)
@@ -271,7 +283,7 @@ namespace OpenSim.Region.Environment.Scenes
prim = ((SceneObject)ent).HasChildPrim(primLocalID);
if (prim != null)
{
- prim.Description = description;
+ prim.Description = description;
break;
}
}
@@ -341,12 +353,41 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
{
- foreach (Entity ent in Entities.Values)
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
{
- if (ent.LocalId == localID)
+ if (ent is SceneObject)
{
- ((PrimitiveOld)ent).UpdatePosition(pos);
- break;
+ prim = ((SceneObject)ent).HasChildPrim(localID);
+ if (prim != null)
+ {
+ prim.UpdatePosition(pos);
+ break;
+ }
+ }
+ }
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient)
+ {
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObject)
+ {
+ prim = ((SceneObject)ent).HasChildPrim(localID);
+ if (prim != null)
+ {
+ prim.UpdateGroupMouseRotation( pos, rot);
+ break;
+ }
}
}
}
@@ -359,7 +400,19 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
{
-
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObject)
+ {
+ prim = ((SceneObject)ent).HasChildPrim(localID);
+ if (prim != null)
+ {
+ prim.UpdateRotation(rot);
+ break;
+ }
+ }
+ }
}
///
@@ -370,6 +423,19 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
{
+ Primitive prim = null;
+ foreach (EntityBase ent in Entities.Values)
+ {
+ if (ent is SceneObject)
+ {
+ prim = ((SceneObject)ent).HasChildPrim(localID);
+ if (prim != null)
+ {
+ prim.ResizeGoup(scale);
+ break;
+ }
+ }
+ }
}
///
--
cgit v1.1