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.cs60
1 files changed, 57 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 0927903..b3d9d15 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Scenes
107 /// <param name="fromAgentID"></param> 107 /// <param name="fromAgentID"></param>
108 public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID) 108 public void SimChat(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID)
109 { 109 {
110 Console.WriteLine("Chat message"); 110 // Console.WriteLine("Chat message");
111 ScenePresence avatar = null; 111 ScenePresence avatar = null;
112 foreach (IClientAPI client in m_clientThreads.Values) 112 foreach (IClientAPI client in m_clientThreads.Values)
113 { 113 {
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Scenes
118 avatar = this.Avatars[client.AgentId]; 118 avatar = this.Avatars[client.AgentId];
119 // int dis = Util.fast_distance2d((int)(client.ClientAvatar.Pos.X - simClient.ClientAvatar.Pos.X), (int)(client.ClientAvatar.Pos.Y - simClient.ClientAvatar.Pos.Y)); 119 // int dis = Util.fast_distance2d((int)(client.ClientAvatar.Pos.X - simClient.ClientAvatar.Pos.X), (int)(client.ClientAvatar.Pos.Y - simClient.ClientAvatar.Pos.Y));
120 dis= (int)avatar.Pos.GetDistanceTo(fromPos); 120 dis= (int)avatar.Pos.GetDistanceTo(fromPos);
121 Console.WriteLine("found avatar at " +dis); 121 //Console.WriteLine("found avatar at " +dis);
122 122
123 } 123 }
124 124
@@ -314,13 +314,27 @@ namespace OpenSim.Region.Environment.Scenes
314 314
315 public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) 315 public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
316 { 316 {
317 Primitive prim = null;
318 foreach (EntityBase ent in Entities.Values)
319 {
320 if (ent is SceneObject)
321 {
322 prim = ((SceneObject)ent).HasChildPrim(objectID);
323 if (prim != null)
324 {
325 ((SceneObject)ent).GrapMovement(offset, pos, remoteClient);
326 break;
327 }
328 }
329 }
330 /*
317 if (this.Entities.ContainsKey(objectID)) 331 if (this.Entities.ContainsKey(objectID))
318 { 332 {
319 if (this.Entities[objectID] is SceneObject) 333 if (this.Entities[objectID] is SceneObject)
320 { 334 {
321 ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); 335 ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient);
322 } 336 }
323 } 337 }*/
324 } 338 }
325 339
326 /// <summary> 340 /// <summary>
@@ -368,6 +382,23 @@ namespace OpenSim.Region.Environment.Scenes
368 } 382 }
369 } 383 }
370 384
385 public void UpdatePrimSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient)
386 {
387 Primitive prim = null;
388 foreach (EntityBase ent in Entities.Values)
389 {
390 if (ent is SceneObject)
391 {
392 prim = ((SceneObject)ent).HasChildPrim(localID);
393 if (prim != null)
394 {
395 prim.UpdateSinglePosition(pos);
396 break;
397 }
398 }
399 }
400 }
401
371 /// <summary> 402 /// <summary>
372 /// 403 ///
373 /// </summary> 404 /// </summary>
@@ -419,6 +450,29 @@ namespace OpenSim.Region.Environment.Scenes
419 /// 450 ///
420 /// </summary> 451 /// </summary>
421 /// <param name="localID"></param> 452 /// <param name="localID"></param>
453 /// <param name="rot"></param>
454 /// <param name="remoteClient"></param>
455 public void UpdatePrimSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient)
456 {
457 Primitive prim = null;
458 foreach (EntityBase ent in Entities.Values)
459 {
460 if (ent is SceneObject)
461 {
462 prim = ((SceneObject)ent).HasChildPrim(localID);
463 if (prim != null)
464 {
465 prim.UpdateSingleRotation(rot);
466 break;
467 }
468 }
469 }
470 }
471
472 /// <summary>
473 ///
474 /// </summary>
475 /// <param name="localID"></param>
422 /// <param name="scale"></param> 476 /// <param name="scale"></param>
423 /// <param name="remoteClient"></param> 477 /// <param name="remoteClient"></param>
424 public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 478 public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient)