avinationmerge
UbitUmarov 2014-08-21 04:35:04 +01:00
parent 87f03c040c
commit 6acfa77919
1 changed files with 29 additions and 15 deletions

View File

@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200)
return; return;
p.ControllingClient.SendPartFullUpdate(sog.RootPart,0); p.ControllingClient.SendPartFullUpdate(sog.RootPart,LocalId + 1);
sog.SendFullUpdateToClient(p.ControllingClient); sog.SendFullUpdateToClient(p.ControllingClient);
SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path
}); });
@ -4748,7 +4748,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (p == this || !sog.HasPrivateAttachmentPoint) if (p == this || !sog.HasPrivateAttachmentPoint)
{ {
p.ControllingClient.SendPartFullUpdate(sog.RootPart, 0); p.ControllingClient.SendPartFullUpdate(sog.RootPart, LocalId +1 );
sog.SendFullUpdateToClient(p.ControllingClient); sog.SendFullUpdateToClient(p.ControllingClient);
} }
} }
@ -5805,7 +5805,7 @@ namespace OpenSim.Region.Framework.Scenes
List<ScenePresence> allpresences = null; List<ScenePresence> allpresences = null;
allpresences = m_scene.GetScenePresences(); allpresences = m_scene.GetScenePresences();
List<uint> killsToSendme = new List<uint>(); List<ScenePresence> killsToSendme = new List<ScenePresence>();
foreach (ScenePresence p in allpresences) foreach (ScenePresence p in allpresences)
{ {
@ -5814,17 +5814,19 @@ namespace OpenSim.Region.Framework.Scenes
if (p.currentParcelUUID == m_currentParcelUUID) if (p.currentParcelUUID == m_currentParcelUUID)
{ {
killsToSendme.Add(p.LocalId); killsToSendme.Add(p);
} }
} }
if (killsToSendme.Count > 0) if (killsToSendme.Count > 0)
{ {
try foreach (ScenePresence p in killsToSendme)
{ p.SendKillTo(this);
ControllingClient.SendKillObject(killsToSendme); // try
} // {
catch (NullReferenceException) { } // ControllingClient.SendKillObject(killsToSendme);
// }
// catch (NullReferenceException) { }
} }
} }
@ -5832,7 +5834,7 @@ namespace OpenSim.Region.Framework.Scenes
bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check) bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check)
{ {
List<ScenePresence> killsToSendto = new List<ScenePresence>(); List<ScenePresence> killsToSendto = new List<ScenePresence>();
List<uint> killsToSendme = new List<uint>(); List<ScenePresence> killsToSendme = new List<ScenePresence>();
List<ScenePresence> viewsToSendto = new List<ScenePresence>(); List<ScenePresence> viewsToSendto = new List<ScenePresence>();
List<ScenePresence> viewsToSendme = new List<ScenePresence>(); List<ScenePresence> viewsToSendme = new List<ScenePresence>();
List<ScenePresence> allpresences = null; List<ScenePresence> allpresences = null;
@ -5903,7 +5905,7 @@ namespace OpenSim.Region.Framework.Scenes
if(p.GodLevel < 200) if(p.GodLevel < 200)
killsToSendto.Add(p); // they dont see me killsToSendto.Add(p); // they dont see me
if(GodLevel < 200) if(GodLevel < 200)
killsToSendme.Add(p.LocalId); // i dont see them killsToSendme.Add(p); // i dont see them
} }
// only those on new parcel need see // only those on new parcel need see
if (currentParcelID == p.currentParcelUUID) if (currentParcelID == p.currentParcelUUID)
@ -5952,7 +5954,7 @@ namespace OpenSim.Region.Framework.Scenes
// only those old parcel need receive kills // only those old parcel need receive kills
if (previusParcelID == p.currentParcelUUID && GodLevel < 200) if (previusParcelID == p.currentParcelUUID && GodLevel < 200)
{ {
killsToSendme.Add(p.LocalId); // i dont see them killsToSendme.Add(p); // i dont see them
} }
else else
{ {
@ -5971,18 +5973,23 @@ namespace OpenSim.Region.Framework.Scenes
{ {
foreach (ScenePresence p in killsToSendto) foreach (ScenePresence p in killsToSendto)
{ {
m_log.Debug("[AVATAR]: killTo: " + Lastname + " " + p.Lastname); m_log.Debug("[AVATAR]: killTo: " + Lastname + " " + p.Lastname);
try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); }
catch (NullReferenceException) { } SendKillTo(p);
// try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); }
// catch (NullReferenceException) { }
} }
} }
if (killsToSendme.Count > 0) if (killsToSendme.Count > 0)
{ {
m_log.Debug("[AVATAR]: killtoMe: " + Lastname + " " + killsToSendme.Count.ToString()); m_log.Debug("[AVATAR]: killtoMe: " + Lastname + " " + killsToSendme.Count.ToString());
foreach (ScenePresence p in killsToSendto)
try try
{ {
ControllingClient.SendKillObject(killsToSendme); p.SendKillTo(this);
} }
catch (NullReferenceException) { } catch (NullReferenceException) { }
@ -6016,5 +6023,12 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
public void SendKillTo(ScenePresence p)
{
foreach (SceneObjectGroup sog in m_attachments)
p.ControllingClient.SendPartFullUpdate(sog.RootPart, LocalId + 1);
p.ControllingClient.SendKillObject(new List<uint> { LocalId });
}
} }
} }