aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs64
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs45
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs7
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs6
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs6
6 files changed, 119 insertions, 19 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index ab6d58f..6cb37b2 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -685,9 +685,10 @@ namespace OpenSim.Framework
685 ExtraData = 1 << 20, 685 ExtraData = 1 << 20,
686 Sound = 1 << 21, 686 Sound = 1 << 21,
687 Joint = 1 << 22, 687 Joint = 1 << 22,
688 FullUpdate = 0x3fffffff, 688 FullUpdate = 0x0fffffff,
689 CancelKill = 0x7fffffff, 689 SendInTransit = 1 << 30,
690 Kill = 0x80000000 690 CancelKill = 0x4fffffff, // 1 << 31
691 Kill = 0x80000000 // 1 << 32
691 } 692 }
692 693
693/* included in .net 4.0 694/* included in .net 4.0
@@ -1187,7 +1188,8 @@ namespace OpenSim.Framework
1187 void SetAgentThrottleSilent(int throttle, int setting); 1188 void SetAgentThrottleSilent(int throttle, int setting);
1188 int GetAgentThrottleSilent(int throttle); 1189 int GetAgentThrottleSilent(int throttle);
1189 1190
1190 void SendAvatarDataImmediate(ISceneEntity avatar); 1191 void SendEntityFullUpdateImmediate(ISceneEntity entity);
1192 void SendEntityTerseUpdateImmediate(ISceneEntity entity);
1191 1193
1192 /// <summary> 1194 /// <summary>
1193 /// Send a positional, velocity, etc. update to the viewer for a given entity. 1195 /// Send a positional, velocity, etc. update to the viewer for a given entity.
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 410ac00..4c77c18 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3950,24 +3950,68 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3950 /// <summary> 3950 /// <summary>
3951 /// Send an ObjectUpdate packet with information about an avatar 3951 /// Send an ObjectUpdate packet with information about an avatar
3952 /// </summary> 3952 /// </summary>
3953 public void SendAvatarDataImmediate(ISceneEntity avatar) 3953 public void SendEntityFullUpdateImmediate(ISceneEntity ent)
3954 { 3954 {
3955// m_log.DebugFormat( 3955// m_log.DebugFormat(
3956// "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}", 3956// "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}",
3957// avatar.Name, avatar.UUID, Name, AgentId); 3957// avatar.Name, avatar.UUID, Name, AgentId);
3958 3958
3959 ScenePresence presence = avatar as ScenePresence; 3959 if (ent == null)
3960 if (presence == null)
3961 return; 3960 return;
3962 3961
3963 ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); 3962 ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate);
3964 objupdate.Header.Zerocoded = true; 3963 objupdate.Header.Zerocoded = true;
3965 3964
3966 objupdate.RegionData.RegionHandle = presence.RegionHandle;
3967// objupdate.RegionData.TimeDilation = ushort.MaxValue;
3968 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 3965 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
3969 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 3966 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
3970 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); 3967
3968 if(ent is ScenePresence)
3969 {
3970 ScenePresence presence = ent as ScenePresence;
3971 objupdate.RegionData.RegionHandle = presence.RegionHandle;
3972 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence);
3973 }
3974 else if(ent is SceneObjectPart)
3975 {
3976 SceneObjectPart part = ent as SceneObjectPart;
3977 objupdate.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3978 objupdate.ObjectData[0] = CreatePrimUpdateBlock(part, (ScenePresence)SceneAgent);
3979 }
3980
3981 OutPacket(objupdate, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3982
3983 // We need to record the avatar local id since the root prim of an attachment points to this.
3984// m_attachmentsSent.Add(avatar.LocalId);
3985 }
3986
3987 public void SendEntityTerseUpdateImmediate(ISceneEntity ent)
3988 {
3989// m_log.DebugFormat(
3990// "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}",
3991// avatar.Name, avatar.UUID, Name, AgentId);
3992
3993 if (ent == null)
3994 return;
3995
3996 ImprovedTerseObjectUpdatePacket objupdate =
3997 (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
3998 objupdate.Header.Zerocoded = true;
3999
4000 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
4001 objupdate.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
4002
4003 if(ent is ScenePresence)
4004 {
4005 ScenePresence presence = ent as ScenePresence;
4006 objupdate.RegionData.RegionHandle = presence.RegionHandle;
4007 objupdate.ObjectData[0] = CreateImprovedTerseBlock(ent, false);
4008 }
4009 else if(ent is SceneObjectPart)
4010 {
4011 SceneObjectPart part = ent as SceneObjectPart;
4012 objupdate.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4013 objupdate.ObjectData[0] = CreateImprovedTerseBlock(ent, false);
4014 }
3971 4015
3972 OutPacket(objupdate, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); 4016 OutPacket(objupdate, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3973 4017
@@ -4021,7 +4065,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4021 4065
4022 #region Primitive Packet/Data Sending Methods 4066 #region Primitive Packet/Data Sending Methods
4023 4067
4024
4025 /// <summary> 4068 /// <summary>
4026 /// Generate one of the object update packets based on PrimUpdateFlags 4069 /// Generate one of the object update packets based on PrimUpdateFlags
4027 /// and broadcast the packet to clients 4070 /// and broadcast the packet to clients
@@ -4157,8 +4200,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4157 { 4200 {
4158 SceneObjectPart part = (SceneObjectPart)update.Entity; 4201 SceneObjectPart part = (SceneObjectPart)update.Entity;
4159 SceneObjectGroup grp = part.ParentGroup; 4202 SceneObjectGroup grp = part.ParentGroup;
4160 if (grp.inTransit) 4203 if (grp.inTransit && !update.Flags.HasFlag(PrimUpdateFlags.SendInTransit))
4161 continue; 4204 continue;
4205 if (update.Flags.HasFlag(PrimUpdateFlags.SendInTransit))
4206 {
4207
4208
4209 }
4162 4210
4163 if (grp.IsDeleted) 4211 if (grp.IsDeleted)
4164 { 4212 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a5af7e1..d50de27 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1778,6 +1778,20 @@ namespace OpenSim.Region.Framework.Scenes
1778 1778
1779 private Dictionary<ulong, spRegionSizeInfo> m_knownChildRegionsSizeInfo = new Dictionary<ulong, spRegionSizeInfo>(); 1779 private Dictionary<ulong, spRegionSizeInfo> m_knownChildRegionsSizeInfo = new Dictionary<ulong, spRegionSizeInfo>();
1780 1780
1781 public void AddNeighbourRegion(GridRegion region, string capsPath)
1782 {
1783 lock (m_knownChildRegions)
1784 {
1785 ulong regionHandle = region.RegionHandle;
1786 m_knownChildRegions.Add(regionHandle,capsPath);
1787
1788 spRegionSizeInfo sizeInfo = new spRegionSizeInfo();
1789 sizeInfo.sizeX = region.RegionSizeX;
1790 sizeInfo.sizeY = region.RegionSizeY;
1791 m_knownChildRegionsSizeInfo[regionHandle] = sizeInfo;
1792 }
1793 }
1794
1781 public void AddNeighbourRegionSizeInfo(GridRegion region) 1795 public void AddNeighbourRegionSizeInfo(GridRegion region)
1782 { 1796 {
1783 lock (m_knownChildRegions) 1797 lock (m_knownChildRegions)
@@ -1826,6 +1840,12 @@ namespace OpenSim.Region.Framework.Scenes
1826 } 1840 }
1827 } 1841 }
1828 1842
1843 public bool knowsNeighbourRegion(ulong regionHandle)
1844 {
1845 lock (m_knownChildRegions)
1846 return m_knownChildRegions.ContainsKey(regionHandle);
1847 }
1848
1829 public void DropOldNeighbours(List<ulong> oldRegions) 1849 public void DropOldNeighbours(List<ulong> oldRegions)
1830 { 1850 {
1831 foreach (ulong handle in oldRegions) 1851 foreach (ulong handle in oldRegions)
@@ -2010,6 +2030,7 @@ namespace OpenSim.Region.Framework.Scenes
2010 return; 2030 return;
2011 } 2031 }
2012 2032
2033
2013 m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2034 m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2014 2035
2015 if(!haveGroupInformation && !IsChildAgent && !IsNPC) 2036 if(!haveGroupInformation && !IsChildAgent && !IsNPC)
@@ -2069,6 +2090,16 @@ namespace OpenSim.Region.Framework.Scenes
2069 2090
2070 if (!IsChildAgent) 2091 if (!IsChildAgent)
2071 { 2092 {
2093 if( ParentPart != null && !IsNPC && (crossingFlags & 0x08) != 0)
2094 {
2095
2096// SceneObjectPart root = ParentPart.ParentGroup.RootPart;
2097// if(root.LocalId != ParentPart.LocalId)
2098// ControllingClient.SendEntityTerseUpdateImmediate(root);
2099// ControllingClient.SendEntityTerseUpdateImmediate(ParentPart);
2100 ParentPart.ParentGroup.SendFullUpdateToClient(ControllingClient);
2101 }
2102
2072 // verify baked textures and cache 2103 // verify baked textures and cache
2073 bool cachedbaked = false; 2104 bool cachedbaked = false;
2074 2105
@@ -2130,6 +2161,7 @@ namespace OpenSim.Region.Framework.Scenes
2130 2161
2131 // send avatar object to all presences including us, so they cross it into region 2162 // send avatar object to all presences including us, so they cross it into region
2132 // then hide if necessary 2163 // then hide if necessary
2164
2133 SendInitialAvatarDataToAllAgents(allpresences); 2165 SendInitialAvatarDataToAllAgents(allpresences);
2134 2166
2135 // send this look 2167 // send this look
@@ -2237,13 +2269,18 @@ namespace OpenSim.Region.Framework.Scenes
2237 m_lastChildAgentUpdateDrawDistance = DrawDistance; 2269 m_lastChildAgentUpdateDrawDistance = DrawDistance;
2238 m_lastChildAgentUpdatePosition = AbsolutePosition; 2270 m_lastChildAgentUpdatePosition = AbsolutePosition;
2239 m_childUpdatesBusy = false; // allow them 2271 m_childUpdatesBusy = false; // allow them
2272
2273
2240 } 2274 }
2241 2275
2242 m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2276 m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts));
2243 2277
2278
2279
2244 // send the rest of the world 2280 // send the rest of the world
2245 if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) 2281 if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide)
2246 SendInitialDataToMe(); 2282 SendInitialDataToMe();
2283
2247 2284
2248 // priority uses avatar position only 2285 // priority uses avatar position only
2249// m_reprioritizationLastPosition = AbsolutePosition; 2286// m_reprioritizationLastPosition = AbsolutePosition;
@@ -3979,7 +4016,7 @@ namespace OpenSim.Region.Framework.Scenes
3979 int count = 0; 4016 int count = 0;
3980 foreach (ScenePresence p in presences) 4017 foreach (ScenePresence p in presences)
3981 { 4018 {
3982 p.ControllingClient.SendAvatarDataImmediate(this); 4019 p.ControllingClient.SendEntityFullUpdateImmediate(this);
3983 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) 4020 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
3984 // either just kill the object 4021 // either just kill the object
3985 // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); 4022 // p.ControllingClient.SendKillObject(new List<uint> {LocalId});
@@ -3992,7 +4029,7 @@ namespace OpenSim.Region.Framework.Scenes
3992 4029
3993 public void SendInitialAvatarDataToAgent(ScenePresence p) 4030 public void SendInitialAvatarDataToAgent(ScenePresence p)
3994 { 4031 {
3995 p.ControllingClient.SendAvatarDataImmediate(this); 4032 p.ControllingClient.SendEntityFullUpdateImmediate(this);
3996 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod) 4033 if (p != this && ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
3997 // either just kill the object 4034 // either just kill the object
3998 // p.ControllingClient.SendKillObject(new List<uint> {LocalId}); 4035 // p.ControllingClient.SendKillObject(new List<uint> {LocalId});
@@ -4009,12 +4046,12 @@ namespace OpenSim.Region.Framework.Scenes
4009 //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID); 4046 //m_log.DebugFormat("[SCENE PRESENCE] SendAvatarDataToAgent from {0} ({1}) to {2} ({3})", Name, UUID, avatar.Name, avatar.UUID);
4010 if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.IsViewerUIGod) 4047 if (ParcelHideThisAvatar && currentParcelUUID != avatar.currentParcelUUID && !avatar.IsViewerUIGod)
4011 return; 4048 return;
4012 avatar.ControllingClient.SendAvatarDataImmediate(this); 4049 avatar.ControllingClient.SendEntityFullUpdateImmediate(this);
4013 } 4050 }
4014 4051
4015 public void SendAvatarDataToAgentNF(ScenePresence avatar) 4052 public void SendAvatarDataToAgentNF(ScenePresence avatar)
4016 { 4053 {
4017 avatar.ControllingClient.SendAvatarDataImmediate(this); 4054 avatar.ControllingClient.SendEntityFullUpdateImmediate(this);
4018 } 4055 }
4019 4056
4020 /// <summary> 4057 /// <summary>
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 83b534b..d39c224 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1097,7 +1097,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1097 1097
1098 } 1098 }
1099 1099
1100 public void SendAvatarDataImmediate(ISceneEntity avatar) 1100 public void SendEntityFullUpdateImmediate(ISceneEntity ent)
1101 {
1102
1103 }
1104
1105 public void SendEntityTerseUpdateImmediate(ISceneEntity ent)
1101 { 1106 {
1102 1107
1103 } 1108 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 6a7c735..151a202 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -813,7 +813,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
813 { 813 {
814 } 814 }
815 815
816 public void SendAvatarDataImmediate(ISceneEntity avatar) 816 public void SendEntityFullUpdateImmediate(ISceneEntity avatar)
817 {
818 }
819
820 public void SendEntityTerseUpdateImmediate(ISceneEntity ent)
817 { 821 {
818 } 822 }
819 823
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index e2f57b5..a835925 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -760,7 +760,11 @@ namespace OpenSim.Tests.Common
760 { 760 {
761 } 761 }
762 762
763 public void SendAvatarDataImmediate(ISceneEntity avatar) 763 public void SendEntityFullUpdateImmediate(ISceneEntity ent)
764 {
765 }
766
767 public void SendEntityTerseUpdateImmediate(ISceneEntity ent)
764 { 768 {
765 } 769 }
766 770