reduce the kills sent, hide attachments kills on origin

avinationmerge
UbitUmarov 2014-08-18 04:07:40 +01:00
parent f8e4805d98
commit 96de2a2fd2
2 changed files with 19 additions and 75 deletions

View File

@ -1782,10 +1782,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Unlike a teleport, here we do not wait for the destination region to confirm the receipt.
m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
AgentHasMovedAway(agent, false);
AgentHasMovedAway(agent, true);
KillEntity(agent.Scene, agent.LocalId);
// agent.parcelRegionCross(false);
agent.parcelRegionCross();
agent.MakeChildAgent();

View File

@ -5503,8 +5503,8 @@ namespace OpenSim.Region.Framework.Scenes
{
if (p.GodLevel < 200)
killsToSendto.Add(p);
if (GodLevel < 200 && p.ParcelHideThisAvatar)
killsToSendme.Add(p.LocalId);
// if (GodLevel < 200 && p.ParcelHideThisAvatar)
// killsToSendme.Add(p.LocalId);
}
else
{
@ -5567,53 +5567,16 @@ namespace OpenSim.Region.Framework.Scenes
*/
}
public void parcelRegionCross(bool abort)
public void parcelRegionCross()
{
// if (!ParcelHideThisAvatar)
// return;
if (!ParcelHideThisAvatar || GodLevel >= 200)
return;
List<ScenePresence> allpresences = null;
allpresences = m_scene.GetScenePresences();
// abort no longer complet
if (abort)
{
List<ScenePresence> viewsToSendme = new List<ScenePresence>();
foreach (ScenePresence p in allpresences)
{
if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
continue;
if (p.currentParcelUUID == m_currentParcelUUID)
{
viewsToSendme.Add(p);
}
}
if (viewsToSendme.Count > 0)
{
foreach (ScenePresence p in viewsToSendme)
{
if (p.IsChildAgent)
continue;
// m_log.Debug("[AVATAR]: viewMe: " + Lastname + " " + p.Lastname);
ControllingClient.SendAvatarDataImmediate(p);
p.SendAppearanceToAgent(this);
p.SendAttachmentsToClient(ControllingClient);
if (p.Animator != null)
p.Animator.SendAnimPackToClient(ControllingClient);
}
}
}
else
{
bool inprivate = ParcelHideThisAvatar && GodLevel < 200;
List<uint> killsToSendme = new List<uint>();
if (inprivate)
{
foreach (ScenePresence p in allpresences)
{
if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
@ -5621,23 +5584,10 @@ namespace OpenSim.Region.Framework.Scenes
if (p.currentParcelUUID == m_currentParcelUUID)
{
m_log.Debug("[AVATAR]: killMe: " + Lastname + " " + p.Lastname);
killsToSendme.Add(p.LocalId);
}
}
}
/*
else
{
foreach (ScenePresence p in allpresences)
{
if (p.IsDeleted || p == this || p.ControllingClient == null || !p.ControllingClient.IsActive)
continue;
killsToSendme.Add(p.LocalId);
}
}
*/
if (killsToSendme.Count > 0)
{
try
@ -5646,11 +5596,6 @@ namespace OpenSim.Region.Framework.Scenes
}
catch (NullReferenceException) { }
}
if (Scene.AttachmentsModule != null)
Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true);
}
}
private void ParcelCrossCheck(UUID currentParcelID,UUID previusParcelID,