aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs22
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs31
2 files changed, 46 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index cd81384..d1f6038 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -546,6 +546,28 @@ namespace OpenSim.Region.Environment.Scenes
546 { 546 {
547 eventManager.TriggerOnRemovePresence(agentID); 547 eventManager.TriggerOnRemovePresence(agentID);
548 548
549 ScenePresence avatar = this.RequestAvatar(agentID);
550
551 m_clientManager.ForEachClient(
552 delegate(IClientAPI client)
553 {
554 client.SendKillObject(avatar.RegionHandle, avatar.LocalId);
555 });
556
557 lock (Avatars) {
558 if (Avatars.ContainsKey(agentID)) {
559 Avatars.Remove(agentID);
560 }
561 }
562 lock (Entities) {
563 if (Entities.ContainsKey(agentID)) {
564 Entities.Remove(agentID);
565 }
566 }
567 // TODO: Add the removal from physics ?
568
569
570
549 return; 571 return;
550 } 572 }
551 #endregion 573 #endregion
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 7330bc5..e65ab7c 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -91,6 +91,12 @@ namespace OpenSim.Region.Environment.Scenes
91 return _physActor; 91 return _physActor;
92 } 92 }
93 } 93 }
94
95 public ulong RegionHandle
96 {
97 get { return m_regionHandle; }
98 }
99
94 #endregion 100 #endregion
95 101
96 #region Constructor(s) 102 #region Constructor(s)
@@ -390,6 +396,16 @@ namespace OpenSim.Region.Environment.Scenes
390 remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos, DefaultTexture); 396 remoteAvatar.ControllingClient.SendAvatarData(m_regionInfo.RegionHandle, this.firstname, this.lastname, this.uuid, this.LocalId, this.Pos, DefaultTexture);
391 } 397 }
392 398
399 public void SendFullUpdateToALLClients()
400 {
401 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
402 foreach (ScenePresence avatar in this.m_world.RequestAvatarList())
403 {
404 this.SendFullUpdateToOtherClient(avatar);
405 avatar.SendFullUpdateToOtherClient(this);
406 }
407 }
408
393 /// <summary> 409 /// <summary>
394 /// 410 ///
395 /// </summary> 411 /// </summary>
@@ -410,6 +426,7 @@ namespace OpenSim.Region.Environment.Scenes
410 public void SendOurAppearance(IClientAPI OurClient) 426 public void SendOurAppearance(IClientAPI OurClient)
411 { 427 {
412 this.ControllingClient.SendWearables(this.Wearables); 428 this.ControllingClient.SendWearables(this.Wearables);
429 this.SendFullUpdateToALLClients();
413 this.m_world.SendAllSceneObjectsToClient(this.ControllingClient); 430 this.m_world.SendAllSceneObjectsToClient(this.ControllingClient);
414 } 431 }
415 432
@@ -429,13 +446,13 @@ namespace OpenSim.Region.Environment.Scenes
429 /// <param name="seq"></param> 446 /// <param name="seq"></param>
430 public void SendAnimPack(LLUUID animID, int seq) 447 public void SendAnimPack(LLUUID animID, int seq)
431 { 448 {
432 this.current_anim = animID; 449 this.current_anim = animID;
433 this.anim_seq = anim_seq; 450 this.anim_seq = seq;
434 List<ScenePresence> avatars = this.m_world.RequestAvatarList(); 451 List<ScenePresence> avatars = this.m_world.RequestAvatarList();
435 for (int i = 0; i < avatars.Count; i++) 452 for (int i = 0; i < avatars.Count; i++)
436 { 453 {
437 avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId); 454 avatars[i].ControllingClient.SendAnimation(animID, seq, this.ControllingClient.AgentId);
438 } 455 }
439 } 456 }
440 457
441 /// <summary> 458 /// <summary>