diff options
author | UbitUmarov | 2014-08-24 00:44:14 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-24 00:44:14 +0100 |
commit | f4a6be86546b3bfeefbdbade33f2faabdd080c1f (patch) | |
tree | 643fa715a1c8b37bc7b3b976344d9aa405e138a8 /OpenSim/Region | |
parent | send avatar kills after attachments, send otherattachments before rest of (diff) | |
download | opensim-SC-f4a6be86546b3bfeefbdbade33f2faabdd080c1f.zip opensim-SC-f4a6be86546b3bfeefbdbade33f2faabdd080c1f.tar.gz opensim-SC-f4a6be86546b3bfeefbdbade33f2faabdd080c1f.tar.bz2 opensim-SC-f4a6be86546b3bfeefbdbade33f2faabdd080c1f.tar.xz |
clean sendKill a bit, remove a IsChild that is set too early in a calling
path
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 |
2 files changed, 17 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e62bea6..e19877c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -1677,28 +1677,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1677 | kill.Header.Reliable = true; | 1677 | kill.Header.Reliable = true; |
1678 | kill.Header.Zerocoded = true; | 1678 | kill.Header.Zerocoded = true; |
1679 | 1679 | ||
1680 | if (localIDs.Count == 1 && m_scene.GetScenePresence(localIDs[0]) != null) | 1680 | OutPacket(kill, ThrottleOutPacketType.Task); |
1681 | { | 1681 | } |
1682 | OutPacket(kill, ThrottleOutPacketType.Task); | ||
1683 | } | ||
1684 | else | ||
1685 | { | ||
1686 | // We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race | ||
1687 | // condition where a kill can be processed before an out-of-date update for the same object. | ||
1688 | // ProcessEntityUpdates() also takes the m_killRecord lock. | ||
1689 | // lock (m_killRecord) | ||
1690 | // { | ||
1691 | // foreach (uint localID in localIDs) | ||
1692 | // m_killRecord.Add(localID); | ||
1693 | |||
1694 | // The throttle queue used here must match that being used for updates. Otherwise, there is a | ||
1695 | // chance that a kill packet put on a separate queue will be sent to the client before an existing | ||
1696 | // update packet on another queue. Receiving updates after kills results in unowned and undeletable | ||
1697 | // scene objects in a viewer until that viewer is relogged in. | ||
1698 | OutPacket(kill, ThrottleOutPacketType.Task); | ||
1699 | // } | ||
1700 | } | ||
1701 | } | ||
1702 | 1682 | ||
1703 | /// <summary> | 1683 | /// <summary> |
1704 | /// Send information about the items contained in a folder to the client. | 1684 | /// Send information about the items contained in a folder to the client. |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f0ea0ba..e61e856 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3590,10 +3590,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3590 | if (p.UUID == UUID) | 3590 | if (p.UUID == UUID) |
3591 | return; | 3591 | return; |
3592 | 3592 | ||
3593 | // get the avatar, then a kill if can't see it | ||
3594 | p.SendInitialAvatarDataToAgent(this); | ||
3595 | |||
3593 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodLevel < 200) | 3596 | if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodLevel < 200) |
3594 | return; | 3597 | return; |
3595 | 3598 | ||
3596 | p.SendAvatarDataToAgentNF(this); | ||
3597 | p.SendAppearanceToAgentNF(this); | 3599 | p.SendAppearanceToAgentNF(this); |
3598 | p.SendAnimPackToAgentNF(this); | 3600 | p.SendAnimPackToAgentNF(this); |
3599 | p.SendAttachmentsToAgentNF(this); | 3601 | p.SendAttachmentsToAgentNF(this); |
@@ -3651,6 +3653,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3651 | m_scene.StatsReporter.AddAgentUpdates(count); | 3653 | m_scene.StatsReporter.AddAgentUpdates(count); |
3652 | } | 3654 | } |
3653 | 3655 | ||
3656 | public void SendInitialAvatarDataToAgent(ScenePresence p) | ||
3657 | { | ||
3658 | p.ControllingClient.SendAvatarDataImmediate(this); | ||
3659 | if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | ||
3660 | // either just kill the object | ||
3661 | // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); | ||
3662 | // or also attachments viewer may still know about | ||
3663 | SendKillTo(p); | ||
3664 | } | ||
3665 | |||
3654 | /// <summary> | 3666 | /// <summary> |
3655 | /// Send avatar data to an agent. | 3667 | /// Send avatar data to an agent. |
3656 | /// </summary> | 3668 | /// </summary> |
@@ -5959,7 +5971,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
5959 | if (p == this) | 5971 | if (p == this) |
5960 | continue; | 5972 | continue; |
5961 | SendKillTo(p); | 5973 | SendKillTo(p); |
5962 | p.SendKillTo(this); | 5974 | if (!p.IsChildAgent) |
5975 | p.SendKillTo(this); | ||
5963 | } | 5976 | } |
5964 | if (Scene.AttachmentsModule != null) | 5977 | if (Scene.AttachmentsModule != null) |
5965 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | 5978 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); |