From 9800c05c1b3c7804466d6f3a9c38a739156625fd Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 1 Jul 2007 17:26:33 +0000 Subject: Started change to having SceneObject and then that having child Primitives which in turn have a Shape object (currently PrimitiveBaseShape). The plan is only for the SceneObject to interface with the physics engines. As a physics Entity should be able to have mulitple shapes connected to it. --- .../Region/Environment/Scenes/Scene.PacketHandlers.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 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 1d55c4d..f3d461a 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -214,12 +214,16 @@ namespace OpenSim.Region.Environment.Scenes /// public void SelectPrim(uint primLocalID, IClientAPI remoteClient) { - foreach (Entity ent in Entities.Values) + Console.WriteLine("prim selected :" + primLocalID); + foreach (EntityBase ent in Entities.Values) { - if (ent.LocalId == primLocalID) + if (ent is SceneObject) { - ((OpenSim.Region.Environment.Scenes.Primitive)ent).GetProperites(remoteClient); - break; + if (((SceneObject)ent).rootLocalID == primLocalID) + { + ((OpenSim.Region.Environment.Scenes.SceneObject)ent).GetProperites(remoteClient); + break; + } } } } @@ -228,7 +232,7 @@ namespace OpenSim.Region.Environment.Scenes { if (this.Entities.ContainsKey(objectID)) { - ((Primitive)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); + ((PrimitiveOld)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); } } @@ -266,7 +270,7 @@ namespace OpenSim.Region.Environment.Scenes { if (ent.LocalId == localID) { - ((OpenSim.Region.Environment.Scenes.Primitive)ent).UpdatePosition(pos); + ((OpenSim.Region.Environment.Scenes.PrimitiveOld)ent).UpdatePosition(pos); break; } } -- cgit v1.1