clean sendKill a bit, remove a IsChild that is set too early in a calling
pathavinationmerge
parent
06b6238d00
commit
f4a6be8654
|
@ -1677,28 +1677,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
kill.Header.Reliable = true;
|
||||
kill.Header.Zerocoded = true;
|
||||
|
||||
if (localIDs.Count == 1 && m_scene.GetScenePresence(localIDs[0]) != null)
|
||||
{
|
||||
OutPacket(kill, ThrottleOutPacketType.Task);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We MUST lock for both manipulating the kill record and sending the packet, in order to avoid a race
|
||||
// condition where a kill can be processed before an out-of-date update for the same object.
|
||||
// ProcessEntityUpdates() also takes the m_killRecord lock.
|
||||
// lock (m_killRecord)
|
||||
// {
|
||||
// foreach (uint localID in localIDs)
|
||||
// m_killRecord.Add(localID);
|
||||
|
||||
// The throttle queue used here must match that being used for updates. Otherwise, there is a
|
||||
// chance that a kill packet put on a separate queue will be sent to the client before an existing
|
||||
// update packet on another queue. Receiving updates after kills results in unowned and undeletable
|
||||
// scene objects in a viewer until that viewer is relogged in.
|
||||
OutPacket(kill, ThrottleOutPacketType.Task);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send information about the items contained in a folder to the client.
|
||||
|
|
|
@ -3590,10 +3590,12 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (p.UUID == UUID)
|
||||
return;
|
||||
|
||||
// get the avatar, then a kill if can't see it
|
||||
p.SendInitialAvatarDataToAgent(this);
|
||||
|
||||
if (p.ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && GodLevel < 200)
|
||||
return;
|
||||
|
||||
p.SendAvatarDataToAgentNF(this);
|
||||
p.SendAppearanceToAgentNF(this);
|
||||
p.SendAnimPackToAgentNF(this);
|
||||
p.SendAttachmentsToAgentNF(this);
|
||||
|
@ -3651,6 +3653,16 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_scene.StatsReporter.AddAgentUpdates(count);
|
||||
}
|
||||
|
||||
public void SendInitialAvatarDataToAgent(ScenePresence p)
|
||||
{
|
||||
p.ControllingClient.SendAvatarDataImmediate(this);
|
||||
if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
|
||||
// either just kill the object
|
||||
// p.ControllingClient.SendKillObject(new List<uint> {LocalId});
|
||||
// or also attachments viewer may still know about
|
||||
SendKillTo(p);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Send avatar data to an agent.
|
||||
/// </summary>
|
||||
|
@ -5959,6 +5971,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (p == this)
|
||||
continue;
|
||||
SendKillTo(p);
|
||||
if (!p.IsChildAgent)
|
||||
p.SendKillTo(this);
|
||||
}
|
||||
if (Scene.AttachmentsModule != null)
|
||||
|
|
Loading…
Reference in New Issue