diff options
author | UbitUmarov | 2014-08-18 04:07:40 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-18 04:07:40 +0100 |
commit | 96de2a2fd2feed899d19fabc077a1bd3f7cc3fc8 (patch) | |
tree | 7d88e2718f622b79aff24f06c8f9b471a499ad31 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | NOT GOOD. Changed hide code on crossing/tp. Send needed avatar and attachments (diff) | |
download | opensim-SC-96de2a2fd2feed899d19fabc077a1bd3f7cc3fc8.zip opensim-SC-96de2a2fd2feed899d19fabc077a1bd3f7cc3fc8.tar.gz opensim-SC-96de2a2fd2feed899d19fabc077a1bd3f7cc3fc8.tar.bz2 opensim-SC-96de2a2fd2feed899d19fabc077a1bd3f7cc3fc8.tar.xz |
reduce the kills sent, hide attachments kills on origin
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 89 |
1 files changed, 17 insertions, 72 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 977ff24..20d0f29 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -5503,8 +5503,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
5503 | { | 5503 | { |
5504 | if (p.GodLevel < 200) | 5504 | if (p.GodLevel < 200) |
5505 | killsToSendto.Add(p); | 5505 | killsToSendto.Add(p); |
5506 | if (GodLevel < 200 && p.ParcelHideThisAvatar) | 5506 | // if (GodLevel < 200 && p.ParcelHideThisAvatar) |
5507 | killsToSendme.Add(p.LocalId); | 5507 | // killsToSendme.Add(p.LocalId); |
5508 | } | 5508 | } |
5509 | else | 5509 | else |
5510 | { | 5510 | { |
@@ -5567,89 +5567,34 @@ namespace OpenSim.Region.Framework.Scenes | |||
5567 | */ | 5567 | */ |
5568 | } | 5568 | } |
5569 | 5569 | ||
5570 | public void parcelRegionCross(bool abort) | 5570 | public void parcelRegionCross() |
5571 | { | 5571 | { |
5572 | // if (!ParcelHideThisAvatar) | 5572 | if (!ParcelHideThisAvatar || GodLevel >= 200) |
5573 | // return; | 5573 | return; |
5574 | 5574 | ||
5575 | List<ScenePresence> allpresences = null; | 5575 | List<ScenePresence> allpresences = null; |
5576 | allpresences = m_scene.GetScenePresences(); | 5576 | allpresences = m_scene.GetScenePresences(); |
5577 | 5577 | ||
5578 | // abort no longer complet | 5578 | List<uint> killsToSendme = new List<uint>(); |
5579 | if (abort) | ||
5580 | { | ||
5581 | List<ScenePresence> viewsToSendme = new List<ScenePresence>(); | ||
5582 | |||
5583 | foreach (ScenePresence p in allpresences) | ||
5584 | { | ||
5585 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) | ||
5586 | continue; | ||
5587 | |||
5588 | if (p.currentParcelUUID == m_currentParcelUUID) | ||
5589 | { | ||
5590 | viewsToSendme.Add(p); | ||
5591 | } | ||
5592 | } | ||
5593 | 5579 | ||
5594 | if (viewsToSendme.Count > 0) | 5580 | foreach (ScenePresence p in allpresences) |
5595 | { | ||
5596 | foreach (ScenePresence p in viewsToSendme) | ||
5597 | { | ||
5598 | if (p.IsChildAgent) | ||
5599 | continue; | ||
5600 | // m_log.Debug("[AVATAR]: viewMe: " + Lastname + " " + p.Lastname); | ||
5601 | ControllingClient.SendAvatarDataImmediate(p); | ||
5602 | p.SendAppearanceToAgent(this); | ||
5603 | p.SendAttachmentsToClient(ControllingClient); | ||
5604 | if (p.Animator != null) | ||
5605 | p.Animator.SendAnimPackToClient(ControllingClient); | ||
5606 | } | ||
5607 | } | ||
5608 | } | ||
5609 | else | ||
5610 | { | 5581 | { |
5582 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) | ||
5583 | continue; | ||
5611 | 5584 | ||
5612 | bool inprivate = ParcelHideThisAvatar && GodLevel < 200; | 5585 | if (p.currentParcelUUID == m_currentParcelUUID) |
5613 | List<uint> killsToSendme = new List<uint>(); | ||
5614 | |||
5615 | if (inprivate) | ||
5616 | { | 5586 | { |
5617 | foreach (ScenePresence p in allpresences) | 5587 | killsToSendme.Add(p.LocalId); |
5618 | { | ||
5619 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) | ||
5620 | continue; | ||
5621 | |||
5622 | if (p.currentParcelUUID == m_currentParcelUUID) | ||
5623 | { | ||
5624 | m_log.Debug("[AVATAR]: killMe: " + Lastname + " " + p.Lastname); | ||
5625 | killsToSendme.Add(p.LocalId); | ||
5626 | } | ||
5627 | } | ||
5628 | } | 5588 | } |
5629 | /* | 5589 | } |
5630 | else | ||
5631 | { | ||
5632 | foreach (ScenePresence p in allpresences) | ||
5633 | { | ||
5634 | if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive) | ||
5635 | continue; | ||
5636 | 5590 | ||
5637 | killsToSendme.Add(p.LocalId); | 5591 | if (killsToSendme.Count > 0) |
5638 | } | 5592 | { |
5639 | } | 5593 | try |
5640 | */ | ||
5641 | if (killsToSendme.Count > 0) | ||
5642 | { | 5594 | { |
5643 | try | 5595 | ControllingClient.SendKillObject(killsToSendme); |
5644 | { | ||
5645 | ControllingClient.SendKillObject(killsToSendme); | ||
5646 | } | ||
5647 | catch (NullReferenceException) { } | ||
5648 | } | 5596 | } |
5649 | 5597 | catch (NullReferenceException) { } | |
5650 | if (Scene.AttachmentsModule != null) | ||
5651 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | ||
5652 | |||
5653 | } | 5598 | } |
5654 | } | 5599 | } |
5655 | 5600 | ||