diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 16 |
1 files changed, 10 insertions, 6 deletions
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 | |||
214 | /// <param name="remoteClient"></param> | 214 | /// <param name="remoteClient"></param> |
215 | public void SelectPrim(uint primLocalID, IClientAPI remoteClient) | 215 | public void SelectPrim(uint primLocalID, IClientAPI remoteClient) |
216 | { | 216 | { |
217 | foreach (Entity ent in Entities.Values) | 217 | Console.WriteLine("prim selected :" + primLocalID); |
218 | foreach (EntityBase ent in Entities.Values) | ||
218 | { | 219 | { |
219 | if (ent.LocalId == primLocalID) | 220 | if (ent is SceneObject) |
220 | { | 221 | { |
221 | ((OpenSim.Region.Environment.Scenes.Primitive)ent).GetProperites(remoteClient); | 222 | if (((SceneObject)ent).rootLocalID == primLocalID) |
222 | break; | 223 | { |
224 | ((OpenSim.Region.Environment.Scenes.SceneObject)ent).GetProperites(remoteClient); | ||
225 | break; | ||
226 | } | ||
223 | } | 227 | } |
224 | } | 228 | } |
225 | } | 229 | } |
@@ -228,7 +232,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
228 | { | 232 | { |
229 | if (this.Entities.ContainsKey(objectID)) | 233 | if (this.Entities.ContainsKey(objectID)) |
230 | { | 234 | { |
231 | ((Primitive)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); | 235 | ((PrimitiveOld)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); |
232 | } | 236 | } |
233 | } | 237 | } |
234 | 238 | ||
@@ -266,7 +270,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
266 | { | 270 | { |
267 | if (ent.LocalId == localID) | 271 | if (ent.LocalId == localID) |
268 | { | 272 | { |
269 | ((OpenSim.Region.Environment.Scenes.Primitive)ent).UpdatePosition(pos); | 273 | ((OpenSim.Region.Environment.Scenes.PrimitiveOld)ent).UpdatePosition(pos); |
270 | break; | 274 | break; |
271 | } | 275 | } |
272 | } | 276 | } |