diff options
author | UbitUmarov | 2014-08-21 04:35:04 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-21 04:35:04 +0100 |
commit | 6acfa779192d09fb144a1ae3a5002bbe547b301d (patch) | |
tree | a6efcf7950572c86fea909cded82413178a0465c /OpenSim | |
parent | bad test (diff) | |
download | opensim-SC-6acfa779192d09fb144a1ae3a5002bbe547b301d.zip opensim-SC-6acfa779192d09fb144a1ae3a5002bbe547b301d.tar.gz opensim-SC-6acfa779192d09fb144a1ae3a5002bbe547b301d.tar.bz2 opensim-SC-6acfa779192d09fb144a1ae3a5002bbe547b301d.tar.xz |
test
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6e69606..ebdf52f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1916,7 +1916,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1916 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 1916 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) |
1917 | return; | 1917 | return; |
1918 | 1918 | ||
1919 | p.ControllingClient.SendPartFullUpdate(sog.RootPart,0); | 1919 | p.ControllingClient.SendPartFullUpdate(sog.RootPart,LocalId + 1); |
1920 | sog.SendFullUpdateToClient(p.ControllingClient); | 1920 | sog.SendFullUpdateToClient(p.ControllingClient); |
1921 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path | 1921 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path |
1922 | }); | 1922 | }); |
@@ -4748,7 +4748,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4748 | { | 4748 | { |
4749 | if (p == this || !sog.HasPrivateAttachmentPoint) | 4749 | if (p == this || !sog.HasPrivateAttachmentPoint) |
4750 | { | 4750 | { |
4751 | p.ControllingClient.SendPartFullUpdate(sog.RootPart, 0); | 4751 | p.ControllingClient.SendPartFullUpdate(sog.RootPart, LocalId +1 ); |
4752 | sog.SendFullUpdateToClient(p.ControllingClient); | 4752 | sog.SendFullUpdateToClient(p.ControllingClient); |
4753 | } | 4753 | } |
4754 | } | 4754 | } |
@@ -5805,7 +5805,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5805 | List<ScenePresence> allpresences = null; | 5805 | List<ScenePresence> allpresences = null; |
5806 | allpresences = m_scene.GetScenePresences(); | 5806 | allpresences = m_scene.GetScenePresences(); |
5807 | 5807 | ||
5808 | List<uint> killsToSendme = new List<uint>(); | 5808 | List<ScenePresence> killsToSendme = new List<ScenePresence>(); |
5809 | 5809 | ||
5810 | foreach (ScenePresence p in allpresences) | 5810 | foreach (ScenePresence p in allpresences) |
5811 | { | 5811 | { |
@@ -5814,17 +5814,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
5814 | 5814 | ||
5815 | if (p.currentParcelUUID == m_currentParcelUUID) | 5815 | if (p.currentParcelUUID == m_currentParcelUUID) |
5816 | { | 5816 | { |
5817 | killsToSendme.Add(p.LocalId); | 5817 | killsToSendme.Add(p); |
5818 | } | 5818 | } |
5819 | } | 5819 | } |
5820 | 5820 | ||
5821 | if (killsToSendme.Count > 0) | 5821 | if (killsToSendme.Count > 0) |
5822 | { | 5822 | { |
5823 | try | 5823 | foreach (ScenePresence p in killsToSendme) |
5824 | { | 5824 | p.SendKillTo(this); |
5825 | ControllingClient.SendKillObject(killsToSendme); | 5825 | // try |
5826 | } | 5826 | // { |
5827 | catch (NullReferenceException) { } | 5827 | // ControllingClient.SendKillObject(killsToSendme); |
5828 | // } | ||
5829 | // catch (NullReferenceException) { } | ||
5828 | } | 5830 | } |
5829 | } | 5831 | } |
5830 | 5832 | ||
@@ -5832,7 +5834,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5832 | bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check) | 5834 | bool currentParcelHide, bool previusParcelHide, bool oldhide,bool check) |
5833 | { | 5835 | { |
5834 | List<ScenePresence> killsToSendto = new List<ScenePresence>(); | 5836 | List<ScenePresence> killsToSendto = new List<ScenePresence>(); |
5835 | List<uint> killsToSendme = new List<uint>(); | 5837 | List<ScenePresence> killsToSendme = new List<ScenePresence>(); |
5836 | List<ScenePresence> viewsToSendto = new List<ScenePresence>(); | 5838 | List<ScenePresence> viewsToSendto = new List<ScenePresence>(); |
5837 | List<ScenePresence> viewsToSendme = new List<ScenePresence>(); | 5839 | List<ScenePresence> viewsToSendme = new List<ScenePresence>(); |
5838 | List<ScenePresence> allpresences = null; | 5840 | List<ScenePresence> allpresences = null; |
@@ -5903,7 +5905,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5903 | if(p.GodLevel < 200) | 5905 | if(p.GodLevel < 200) |
5904 | killsToSendto.Add(p); // they dont see me | 5906 | killsToSendto.Add(p); // they dont see me |
5905 | if(GodLevel < 200) | 5907 | if(GodLevel < 200) |
5906 | killsToSendme.Add(p.LocalId); // i dont see them | 5908 | killsToSendme.Add(p); // i dont see them |
5907 | } | 5909 | } |
5908 | // only those on new parcel need see | 5910 | // only those on new parcel need see |
5909 | if (currentParcelID == p.currentParcelUUID) | 5911 | if (currentParcelID == p.currentParcelUUID) |
@@ -5952,7 +5954,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5952 | // only those old parcel need receive kills | 5954 | // only those old parcel need receive kills |
5953 | if (previusParcelID == p.currentParcelUUID && GodLevel < 200) | 5955 | if (previusParcelID == p.currentParcelUUID && GodLevel < 200) |
5954 | { | 5956 | { |
5955 | killsToSendme.Add(p.LocalId); // i dont see them | 5957 | killsToSendme.Add(p); // i dont see them |
5956 | } | 5958 | } |
5957 | else | 5959 | else |
5958 | { | 5960 | { |
@@ -5971,18 +5973,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
5971 | { | 5973 | { |
5972 | foreach (ScenePresence p in killsToSendto) | 5974 | foreach (ScenePresence p in killsToSendto) |
5973 | { | 5975 | { |
5976 | |||
5974 | m_log.Debug("[AVATAR]: killTo: " + Lastname + " " + p.Lastname); | 5977 | m_log.Debug("[AVATAR]: killTo: " + Lastname + " " + p.Lastname); |
5975 | try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); } | 5978 | |
5976 | catch (NullReferenceException) { } | 5979 | SendKillTo(p); |
5980 | // try { p.ControllingClient.SendKillObject(new List<uint> { LocalId }); } | ||
5981 | // catch (NullReferenceException) { } | ||
5977 | } | 5982 | } |
5978 | } | 5983 | } |
5979 | 5984 | ||
5980 | if (killsToSendme.Count > 0) | 5985 | if (killsToSendme.Count > 0) |
5981 | { | 5986 | { |
5982 | m_log.Debug("[AVATAR]: killtoMe: " + Lastname + " " + killsToSendme.Count.ToString()); | 5987 | m_log.Debug("[AVATAR]: killtoMe: " + Lastname + " " + killsToSendme.Count.ToString()); |
5988 | |||
5989 | foreach (ScenePresence p in killsToSendto) | ||
5983 | try | 5990 | try |
5984 | { | 5991 | { |
5985 | ControllingClient.SendKillObject(killsToSendme); | 5992 | p.SendKillTo(this); |
5986 | } | 5993 | } |
5987 | catch (NullReferenceException) { } | 5994 | catch (NullReferenceException) { } |
5988 | 5995 | ||
@@ -6016,5 +6023,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
6016 | } | 6023 | } |
6017 | } | 6024 | } |
6018 | } | 6025 | } |
6026 | |||
6027 | public void SendKillTo(ScenePresence p) | ||
6028 | { | ||
6029 | foreach (SceneObjectGroup sog in m_attachments) | ||
6030 | p.ControllingClient.SendPartFullUpdate(sog.RootPart, LocalId + 1); | ||
6031 | p.ControllingClient.SendKillObject(new List<uint> { LocalId }); | ||
6032 | } | ||
6019 | } | 6033 | } |
6020 | } | 6034 | } |