aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs242
1 files changed, 121 insertions, 121 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 27ca740..dba2872 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -434,7 +434,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
434 /// Entity update queues 434 /// Entity update queues
435 /// </summary> 435 /// </summary>
436 public PriorityQueue EntityUpdateQueue { get { return m_entityUpdates; } } 436 public PriorityQueue EntityUpdateQueue { get { return m_entityUpdates; } }
437 437
438 /// <summary> 438 /// <summary>
439 /// First name of the agent/avatar represented by the client 439 /// First name of the agent/avatar represented by the client
440 /// </summary> 440 /// </summary>
@@ -478,7 +478,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
478 public List<uint> SelectedObjects {get; private set;} 478 public List<uint> SelectedObjects {get; private set;}
479 479
480 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } 480 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } }
481 481
482 482
483 #endregion Properties 483 #endregion Properties
484 484
@@ -554,7 +554,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
554 // there is some unidentified connection problem, not where we have issues due to deadlock 554 // there is some unidentified connection problem, not where we have issues due to deadlock
555 if (!IsActive && !force) 555 if (!IsActive && !force)
556 { 556 {
557 m_log.DebugFormat( "{0} Not attempting to close inactive client {1} in {2} since force flag is not set", 557 m_log.DebugFormat( "{0} Not attempting to close inactive client {1} in {2} since force flag is not set",
558 LogHeader, Name, m_scene.Name); 558 LogHeader, Name, m_scene.Name);
559 559
560 return; 560 return;
@@ -713,13 +713,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
713 /// <param name="packetType"></param> 713 /// <param name="packetType"></param>
714 /// <param name="handler"></param> 714 /// <param name="handler"></param>
715 /// <param name="doAsync"> 715 /// <param name="doAsync">
716 /// If true, when the packet is received handle it on a different thread. Whether this is given direct to 716 /// If true, when the packet is received handle it on a different thread. Whether this is given direct to
717 /// a threadpool thread or placed in a queue depends on the inEngine parameter. 717 /// a threadpool thread or placed in a queue depends on the inEngine parameter.
718 /// </param> 718 /// </param>
719 /// <param name="inEngine"> 719 /// <param name="inEngine">
720 /// If async is false then this parameter is ignored. 720 /// If async is false then this parameter is ignored.
721 /// If async is true and inEngine is false, then the packet is sent directly to a 721 /// If async is true and inEngine is false, then the packet is sent directly to a
722 /// threadpool thread. 722 /// threadpool thread.
723 /// If async is true and inEngine is true, then the packet is sent to the IncomingPacketAsyncHandlingEngine. 723 /// If async is true and inEngine is true, then the packet is sent to the IncomingPacketAsyncHandlingEngine.
724 /// This may result in slower handling but reduces the risk of overloading the simulator when there are many 724 /// This may result in slower handling but reduces the risk of overloading the simulator when there are many
725 /// simultaneous async requests. 725 /// simultaneous async requests.
@@ -820,7 +820,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
820 public void ProcessSpecificPacketAsync(object state) 820 public void ProcessSpecificPacketAsync(object state)
821 { 821 {
822 AsyncPacketProcess packetObject = (AsyncPacketProcess)state; 822 AsyncPacketProcess packetObject = (AsyncPacketProcess)state;
823 823
824 try 824 try
825 { 825 {
826 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack); 826 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack);
@@ -830,7 +830,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
830 // Make sure that we see any exception caused by the asynchronous operation. 830 // Make sure that we see any exception caused by the asynchronous operation.
831 m_log.Error( 831 m_log.Error(
832 string.Format( 832 string.Format(
833 "[LLCLIENTVIEW]: Caught exception while processing {0} for {1} ", packetObject.Pack, Name), 833 "[LLCLIENTVIEW]: Caught exception while processing {0} for {1} ", packetObject.Pack, Name),
834 e); 834 e);
835 } 835 }
836 } 836 }
@@ -976,7 +976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
976 if (im.imSessionID == UUID.Zero.Guid) 976 if (im.imSessionID == UUID.Zero.Guid)
977 msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID); 977 msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID);
978 else 978 else
979 msg.MessageBlock.ID = new UUID(im.imSessionID); 979 msg.MessageBlock.ID = new UUID(im.imSessionID);
980 msg.MessageBlock.Offline = im.offline; 980 msg.MessageBlock.Offline = im.offline;
981 msg.MessageBlock.ParentEstateID = im.ParentEstateID; 981 msg.MessageBlock.ParentEstateID = im.ParentEstateID;
982 msg.MessageBlock.Position = im.Position; 982 msg.MessageBlock.Position = im.Position;
@@ -1301,7 +1301,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1301 1301
1302 // Legacy form of invocation that passes around a bare data array. 1302 // Legacy form of invocation that passes around a bare data array.
1303 // Just ignore what was passed and use the real terrain info that is part of the scene. 1303 // Just ignore what was passed and use the real terrain info that is part of the scene.
1304 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI, 1304 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI,
1305 // there is a special form for specifying multiple terrain patches to send. 1305 // there is a special form for specifying multiple terrain patches to send.
1306 // The form is to pass 'px' as negative the number of patches to send and to 1306 // The form is to pass 'px' as negative the number of patches to send and to
1307 // pass the float array as pairs of patch X and Y coordinates. So, passing 'px' 1307 // pass the float array as pairs of patch X and Y coordinates. So, passing 'px'
@@ -1396,7 +1396,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1396 public virtual void SendWindData(int version, Vector2[] windSpeeds) 1396 public virtual void SendWindData(int version, Vector2[] windSpeeds)
1397 { 1397 {
1398// Vector2[] windSpeeds = (Vector2[])o; 1398// Vector2[] windSpeeds = (Vector2[])o;
1399 1399
1400 ulong handle = this.Scene.RegionInfo.RegionHandle; 1400 ulong handle = this.Scene.RegionInfo.RegionHandle;
1401 bool isNewData; 1401 bool isNewData;
1402 lock(lastWindPackets) 1402 lock(lastWindPackets)
@@ -1780,7 +1780,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1780 m_entityUpdates.Remove(localIDs); 1780 m_entityUpdates.Remove(localIDs);
1781 1781
1782 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); 1782 KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject);
1783 1783
1784 int perpacket = localIDs.Count; 1784 int perpacket = localIDs.Count;
1785 if(perpacket > 200) 1785 if(perpacket > 200)
1786 perpacket = 200; 1786 perpacket = 200;
@@ -2545,7 +2545,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2545 for (int i = 0; i < buttonlabels.Length; i++) 2545 for (int i = 0; i < buttonlabels.Length; i++)
2546 { 2546 {
2547 buttons[i] = new ScriptDialogPacket.ButtonsBlock(); 2547 buttons[i] = new ScriptDialogPacket.ButtonsBlock();
2548 buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24); 2548 buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24);
2549 } 2549 }
2550 dialog.Buttons = buttons; 2550 dialog.Buttons = buttons;
2551 2551
@@ -2863,15 +2863,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2863 public void SendSelectedPartsProprieties(List<ISceneEntity> parts) 2863 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
2864 { 2864 {
2865/* not in use 2865/* not in use
2866 // udp part 2866 // udp part
2867 ObjectPropertiesPacket packet = 2867 ObjectPropertiesPacket packet =
2868 (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 2868 (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
2869 ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count]; 2869 ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count];
2870 2870
2871 int i = 0; 2871 int i = 0;
2872 foreach(SceneObjectPart sop in parts) 2872 foreach(SceneObjectPart sop in parts)
2873 ObjectData[i++] = CreateObjectPropertiesBlock(sop); 2873 ObjectData[i++] = CreateObjectPropertiesBlock(sop);
2874 2874
2875 packet.ObjectData = ObjectData; 2875 packet.ObjectData = ObjectData;
2876 packet.Header.Zerocoded = true; 2876 packet.Header.Zerocoded = true;
2877 // udp send splits this mega packets correctly 2877 // udp send splits this mega packets correctly
@@ -3003,13 +3003,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3003 isWearable = ((AssetType) req.AssetInf.Type == 3003 isWearable = ((AssetType) req.AssetInf.Type ==
3004 AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing); 3004 AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing);
3005 3005
3006 3006
3007 //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable); 3007 //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable);
3008 3008
3009 3009
3010 //if (isWearable) 3010 //if (isWearable)
3011 // m_log.Debug((AssetType)req.AssetInf.Type); 3011 // m_log.Debug((AssetType)req.AssetInf.Type);
3012 3012
3013 TransferInfoPacket Transfer = new TransferInfoPacket(); 3013 TransferInfoPacket Transfer = new TransferInfoPacket();
3014 Transfer.TransferInfo.ChannelType = 2; 3014 Transfer.TransferInfo.ChannelType = 2;
3015 Transfer.TransferInfo.Status = 0; 3015 Transfer.TransferInfo.Status = 0;
@@ -3537,7 +3537,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3537 { 3537 {
3538 if(avatarID != AgentId) 3538 if(avatarID != AgentId)
3539 m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId"); 3539 m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId");
3540 3540
3541 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); 3541 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
3542 if(eq != null) 3542 if(eq != null)
3543 { 3543 {
@@ -3862,7 +3862,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3862 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; 3862 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
3863 AgentWearablesUpdatePacket.WearableDataBlock awb; 3863 AgentWearablesUpdatePacket.WearableDataBlock awb;
3864 int idx = 0; 3864 int idx = 0;
3865 3865
3866 for (int i = 0; i < wearables.Length; i++) 3866 for (int i = 0; i < wearables.Length; i++)
3867 { 3867 {
3868 for (int j = 0; j < wearables[i].Count; j++) 3868 for (int j = 0; j < wearables[i].Count; j++)
@@ -3878,7 +3878,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3878 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", 3878 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
3879 // awb.ItemID, awb.AssetID, i, Name); 3879 // awb.ItemID, awb.AssetID, i, Name);
3880 } 3880 }
3881 } 3881 }
3882 3882
3883 OutPacket(aw, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); 3883 OutPacket(aw, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3884 } 3884 }
@@ -3955,7 +3955,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
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 ScenePresence presence = avatar as ScenePresence;
3960 if (presence == null) 3960 if (presence == null)
3961 return; 3961 return;
@@ -3965,7 +3965,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3965 3965
3966 objupdate.RegionData.RegionHandle = presence.RegionHandle; 3966 objupdate.RegionData.RegionHandle = presence.RegionHandle;
3967// objupdate.RegionData.TimeDilation = ushort.MaxValue; 3967// objupdate.RegionData.TimeDilation = ushort.MaxValue;
3968 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); 3968 objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
3969 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 3969 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
3970 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); 3970 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence);
3971 3971
@@ -4021,7 +4021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4021 4021
4022 #region Primitive Packet/Data Sending Methods 4022 #region Primitive Packet/Data Sending Methods
4023 4023
4024 4024
4025 /// <summary> 4025 /// <summary>
4026 /// Generate one of the object update packets based on PrimUpdateFlags 4026 /// Generate one of the object update packets based on PrimUpdateFlags
4027 /// and broadcast the packet to clients 4027 /// and broadcast the packet to clients
@@ -4054,18 +4054,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4054 uint priority = m_prioritizer.GetUpdatePriority(this, entity); 4054 uint priority = m_prioritizer.GetUpdatePriority(this, entity);
4055 4055
4056 lock (m_entityUpdates.SyncRoot) 4056 lock (m_entityUpdates.SyncRoot)
4057 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags)); 4057 m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags));
4058 } 4058 }
4059 4059
4060 /// <summary> 4060 /// <summary>
4061 /// Requeue an EntityUpdate when it was not acknowledged by the client. 4061 /// Requeue an EntityUpdate when it was not acknowledged by the client.
4062 /// We will update the priority and put it in the correct queue, merging update flags 4062 /// We will update the priority and put it in the correct queue, merging update flags
4063 /// with any other updates that may be queued for the same entity. 4063 /// with any other updates that may be queued for the same entity.
4064 /// The original update time is used for the merged update. 4064 /// The original update time is used for the merged update.
4065 /// </summary> 4065 /// </summary>
4066 private void ResendPrimUpdate(EntityUpdate update) 4066 private void ResendPrimUpdate(EntityUpdate update)
4067 { 4067 {
4068 // If the update exists in priority queue, it will be updated. 4068 // If the update exists in priority queue, it will be updated.
4069 // If it does not exist then it will be added with the current (rather than its original) priority 4069 // If it does not exist then it will be added with the current (rather than its original) priority
4070 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity); 4070 uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
4071 4071
@@ -4074,9 +4074,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4074 } 4074 }
4075 4075
4076 /// <summary> 4076 /// <summary>
4077 /// Requeue a list of EntityUpdates when they were not acknowledged by the client. 4077 /// Requeue a list of EntityUpdates when they were not acknowledged by the client.
4078 /// We will update the priority and put it in the correct queue, merging update flags 4078 /// We will update the priority and put it in the correct queue, merging update flags
4079 /// with any other updates that may be queued for the same entity. 4079 /// with any other updates that may be queued for the same entity.
4080 /// The original update time is used for the merged update. 4080 /// The original update time is used for the merged update.
4081 /// </summary> 4081 /// </summary>
4082 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket) 4082 private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
@@ -4140,7 +4140,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4140 lock (m_entityUpdates.SyncRoot) 4140 lock (m_entityUpdates.SyncRoot)
4141 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue)) 4141 if (!m_entityUpdates.TryDequeue(out update, out timeinqueue))
4142 break; 4142 break;
4143 4143
4144 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; 4144 PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags;
4145 4145
4146 if(updateFlags.HasFlag(PrimUpdateFlags.Kill)) 4146 if(updateFlags.HasFlag(PrimUpdateFlags.Kill))
@@ -4243,7 +4243,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4243 dpos = (float)Math.Sqrt(dpos) - bradius; 4243 dpos = (float)Math.Sqrt(dpos) - bradius;
4244 if(dpos > cullingrange) 4244 if(dpos > cullingrange)
4245 continue; 4245 continue;
4246 4246
4247 GroupsNeedFullUpdate.Add(grp); 4247 GroupsNeedFullUpdate.Add(grp);
4248 continue; 4248 continue;
4249 } 4249 }
@@ -4276,7 +4276,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4276 bool canUseCompressed = true; 4276 bool canUseCompressed = true;
4277 bool canUseImproved = true; 4277 bool canUseImproved = true;
4278 4278
4279 4279
4280 // Compressed object updates only make sense for LL primitives 4280 // Compressed object updates only make sense for LL primitives
4281 if (!(update.Entity is SceneObjectPart)) 4281 if (!(update.Entity is SceneObjectPart))
4282 { 4282 {
@@ -4316,14 +4316,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4316 canUseImproved = false; 4316 canUseImproved = false;
4317 } 4317 }
4318 } 4318 }
4319 4319
4320 #endregion UpdateFlags to packet type conversion 4320 #endregion UpdateFlags to packet type conversion
4321 4321
4322 #region Block Construction 4322 #region Block Construction
4323 4323
4324 // TODO: Remove this once we can build compressed updates 4324 // TODO: Remove this once we can build compressed updates
4325 canUseCompressed = false; 4325 canUseCompressed = false;
4326 4326
4327 if (!canUseImproved && !canUseCompressed) 4327 if (!canUseImproved && !canUseCompressed)
4328 { 4328 {
4329 ObjectUpdatePacket.ObjectDataBlock ablock; 4329 ObjectUpdatePacket.ObjectDataBlock ablock;
@@ -4368,7 +4368,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4368 } 4368 }
4369 4369
4370 #region Packet Sending 4370 #region Packet Sending
4371 4371
4372 ushort timeDilation; 4372 ushort timeDilation;
4373 4373
4374 if(!IsActive) 4374 if(!IsActive)
@@ -4398,7 +4398,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4398 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4398 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4399 packet.RegionData.TimeDilation = timeDilation; 4399 packet.RegionData.TimeDilation = timeDilation;
4400 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[objectUpdateBlocks.Count]; 4400 packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[objectUpdateBlocks.Count];
4401 4401
4402 for (int i = 0; i < objectUpdateBlocks.Count; i++) 4402 for (int i = 0; i < objectUpdateBlocks.Count; i++)
4403 packet.ObjectData[i] = objectUpdateBlocks[i]; 4403 packet.ObjectData[i] = objectUpdateBlocks[i];
4404 4404
@@ -4406,7 +4406,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4406 4406
4407 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); }); 4407 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(objectUpdates.Value, oPacket); });
4408 } 4408 }
4409 4409
4410 if (compressedUpdateBlocks.Count > 0) 4410 if (compressedUpdateBlocks.Count > 0)
4411 { 4411 {
4412 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); 4412 ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed);
@@ -4421,7 +4421,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4421 4421
4422 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); }); 4422 OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(compressedUpdates.Value, oPacket); });
4423 } 4423 }
4424 4424
4425 if (terseUpdateBlocks.Count > 0) 4425 if (terseUpdateBlocks.Count > 0)
4426 { 4426 {
4427 ImprovedTerseObjectUpdatePacket packet 4427 ImprovedTerseObjectUpdatePacket packet
@@ -4430,7 +4430,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4430 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 4430 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4431 packet.RegionData.TimeDilation = timeDilation; 4431 packet.RegionData.TimeDilation = timeDilation;
4432 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseUpdateBlocks.Count]; 4432 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[terseUpdateBlocks.Count];
4433 4433
4434 for (int i = 0; i < terseUpdateBlocks.Count; i++) 4434 for (int i = 0; i < terseUpdateBlocks.Count; i++)
4435 packet.ObjectData[i] = terseUpdateBlocks[i]; 4435 packet.ObjectData[i] = terseUpdateBlocks[i];
4436 4436
@@ -4484,11 +4484,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4484 } 4484 }
4485 4485
4486// m_log.DebugFormat( 4486// m_log.DebugFormat(
4487// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}", 4487// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}",
4488// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); 4488// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name);
4489// 4489//
4490 } 4490 }
4491 4491
4492 public void ReprioritizeUpdates() 4492 public void ReprioritizeUpdates()
4493 { 4493 {
4494 lock (m_entityUpdates.SyncRoot) 4494 lock (m_entityUpdates.SyncRoot)
@@ -4600,7 +4600,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4600 foreach(SceneObjectPart p in grp.Parts) 4600 foreach(SceneObjectPart p in grp.Parts)
4601 SendEntityUpdate(p,PrimUpdateFlags.CancelKill); 4601 SendEntityUpdate(p,PrimUpdateFlags.CancelKill);
4602 } 4602 }
4603 } 4603 }
4604 4604
4605 CheckGroupsInViewBusy = false; 4605 CheckGroupsInViewBusy = false;
4606 } 4606 }
@@ -4640,8 +4640,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4640 4640
4641 if ((categories & ThrottleOutPacketTypeFlags.Task) != 0) 4641 if ((categories & ThrottleOutPacketTypeFlags.Task) != 0)
4642 { 4642 {
4643 int maxUpdateBytes = m_udpClient.GetCatBytesCanSend(ThrottleOutPacketType.Task, 30); 4643 int maxUpdateBytes = m_udpClient.GetCatBytesCanSend(ThrottleOutPacketType.Task, 30);
4644 4644
4645 if (m_entityUpdates.Count > 0) 4645 if (m_entityUpdates.Count > 0)
4646 ProcessEntityUpdates(maxUpdateBytes); 4646 ProcessEntityUpdates(maxUpdateBytes);
4647 4647
@@ -4660,7 +4660,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4660 if (m_entityUpdates.Count > 0) 4660 if (m_entityUpdates.Count > 0)
4661 return true; 4661 return true;
4662 if (m_entityProps.Count > 0) 4662 if (m_entityProps.Count > 0)
4663 return true; 4663 return true;
4664 } 4664 }
4665 4665
4666 if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) 4666 if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0)
@@ -4775,7 +4775,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4775 { 4775 {
4776 internal bool SendFamilyProps; 4776 internal bool SendFamilyProps;
4777 internal bool SendObjectProps; 4777 internal bool SendObjectProps;
4778 4778
4779 public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj) 4779 public ObjectPropertyUpdate(ISceneEntity entity, uint flags, bool sendfam, bool sendobj)
4780 : base(entity,(PrimUpdateFlags)flags) 4780 : base(entity,(PrimUpdateFlags)flags)
4781 { 4781 {
@@ -4790,7 +4790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4790 base.Update(update); 4790 base.Update(update);
4791 } 4791 }
4792 } 4792 }
4793 4793
4794 public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags) 4794 public void SendObjectPropertiesFamilyData(ISceneEntity entity, uint requestFlags)
4795 { 4795 {
4796 uint priority = 0; // time based ordering only 4796 uint priority = 0; // time based ordering only
@@ -4824,7 +4824,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4824 foreach (ObjectPropertyUpdate update in updates) 4824 foreach (ObjectPropertyUpdate update in updates)
4825 ResendPropertyUpdate(update); 4825 ResendPropertyUpdate(update);
4826 } 4826 }
4827 4827
4828 public void SendObjectPropertiesReply(ISceneEntity entity) 4828 public void SendObjectPropertiesReply(ISceneEntity entity)
4829 { 4829 {
4830 uint priority = 0; // time based ordering only 4830 uint priority = 0; // time based ordering only
@@ -4845,8 +4845,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4845 4845
4846// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = 4846// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates =
4847// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); 4847// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>();
4848 4848
4849 4849
4850 EntityUpdate iupdate; 4850 EntityUpdate iupdate;
4851 Int32 timeinqueue; // this is just debugging code & can be dropped later 4851 Int32 timeinqueue; // this is just debugging code & can be dropped later
4852 4852
@@ -4882,7 +4882,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4882 } 4882 }
4883 } 4883 }
4884 } 4884 }
4885 4885
4886 if (objectPropertiesBlocks.Count > 0) 4886 if (objectPropertiesBlocks.Count > 0)
4887 { 4887 {
4888 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 4888 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
@@ -4890,7 +4890,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4890 for (int i = 0; i < objectPropertiesBlocks.Count; i++) 4890 for (int i = 0; i < objectPropertiesBlocks.Count; i++)
4891 packet.ObjectData[i] = objectPropertiesBlocks[i]; 4891 packet.ObjectData[i] = objectPropertiesBlocks[i];
4892 4892
4893 4893
4894 objectPropertiesBlocks.Clear(); 4894 objectPropertiesBlocks.Clear();
4895 packet.Header.Zerocoded = true; 4895 packet.Header.Zerocoded = true;
4896 4896
@@ -4907,12 +4907,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4907 // pbcnt += blocks.Count; 4907 // pbcnt += blocks.Count;
4908 // ppcnt++; 4908 // ppcnt++;
4909 } 4909 }
4910 4910
4911 // Int32 fpcnt = 0; 4911 // Int32 fpcnt = 0;
4912 // Int32 fbcnt = 0; 4912 // Int32 fbcnt = 0;
4913 4913
4914 if (objectFamilyBlocks.Count > 0) 4914 if (objectFamilyBlocks.Count > 0)
4915 { 4915 {
4916 // one packet per object block... uggh... 4916 // one packet per object block... uggh...
4917 for (int i = 0; i < objectFamilyBlocks.Count; i++) 4917 for (int i = 0; i < objectFamilyBlocks.Count; i++)
4918 { 4918 {
@@ -4965,7 +4965,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4965 } 4965 }
4966 needPhysics.Clear(); 4966 needPhysics.Clear();
4967 } 4967 }
4968 4968
4969 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt); 4969 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt);
4970 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt); 4970 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt);
4971 } 4971 }
@@ -4998,7 +4998,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4998 4998
4999 return block; 4999 return block;
5000 } 5000 }
5001 5001
5002 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop) 5002 private ObjectPropertiesPacket.ObjectDataBlock CreateObjectPropertiesBlock(SceneObjectPart sop)
5003 { 5003 {
5004 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 5004 //ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
@@ -5024,7 +5024,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5024 block.FolderID = UUID.Zero; // sog.FromFolderID ?? 5024 block.FolderID = UUID.Zero; // sog.FromFolderID ??
5025 block.FromTaskID = UUID.Zero; // ??? 5025 block.FromTaskID = UUID.Zero; // ???
5026 block.InventorySerial = (short)sop.InventorySerial; 5026 block.InventorySerial = (short)sop.InventorySerial;
5027 5027
5028 SceneObjectPart root = sop.ParentGroup.RootPart; 5028 SceneObjectPart root = sop.ParentGroup.RootPart;
5029 5029
5030 block.TouchName = Util.StringToBytes256(root.TouchName); 5030 block.TouchName = Util.StringToBytes256(root.TouchName);
@@ -5036,7 +5036,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5036// { 5036// {
5037// using (BinaryWriter binWriter = new BinaryWriter(memStream)) 5037// using (BinaryWriter binWriter = new BinaryWriter(memStream))
5038// { 5038// {
5039// for (int i = 0; i < sop.GetNumberOfSides(); i++) 5039// for (int i = 0; i < sop.GetNumberOfSides(); i++)
5040// { 5040// {
5041// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i]; 5041// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i];
5042// 5042//
@@ -5053,7 +5053,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5053// block.TextureID = memStream.ToArray(); 5053// block.TextureID = memStream.ToArray();
5054// } 5054// }
5055// } 5055// }
5056 5056
5057 block.TextureID = new byte[0]; // TextureID ??? 5057 block.TextureID = new byte[0]; // TextureID ???
5058 block.SitName = Util.StringToBytes256(root.SitName); 5058 block.SitName = Util.StringToBytes256(root.SitName);
5059 block.OwnerMask = root.OwnerMask; 5059 block.OwnerMask = root.OwnerMask;
@@ -5202,7 +5202,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5202 public void SendEstateCovenantInformation(UUID covenant) 5202 public void SendEstateCovenantInformation(UUID covenant)
5203 { 5203 {
5204// m_log.DebugFormat("[LLCLIENTVIEW]: Sending estate covenant asset id of {0} to {1}", covenant, Name); 5204// m_log.DebugFormat("[LLCLIENTVIEW]: Sending estate covenant asset id of {0} to {1}", covenant, Name);
5205 5205
5206 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket(); 5206 EstateCovenantReplyPacket einfopack = new EstateCovenantReplyPacket();
5207 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock(); 5207 EstateCovenantReplyPacket.DataBlock edata = new EstateCovenantReplyPacket.DataBlock();
5208 edata.CovenantID = covenant; 5208 edata.CovenantID = covenant;
@@ -5219,7 +5219,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5219 { 5219 {
5220// m_log.DebugFormat( 5220// m_log.DebugFormat(
5221// "[LLCLIENTVIEW]: Sending detailed estate data to {0} with covenant asset id {1}", Name, covenant); 5221// "[LLCLIENTVIEW]: Sending detailed estate data to {0} with covenant asset id {1}", Name, covenant);
5222 5222
5223 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); 5223 EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
5224 packet.MethodData.Invoice = invoice; 5224 packet.MethodData.Invoice = invoice;
5225 packet.AgentData.TransactionID = UUID.Random(); 5225 packet.AgentData.TransactionID = UUID.Random();
@@ -5282,13 +5282,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5282 } 5282 }
5283 5283
5284 public void SendLandProperties( 5284 public void SendLandProperties(
5285 int sequence_id, bool snap_selection, int request_result, ILandObject lo, 5285 int sequence_id, bool snap_selection, int request_result, ILandObject lo,
5286 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 5286 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
5287 { 5287 {
5288// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name); 5288// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name);
5289 5289
5290 LandData landData = lo.LandData; 5290 LandData landData = lo.LandData;
5291 5291
5292 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); 5292 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
5293 5293
5294 updateMessage.AABBMax = landData.AABBMax; 5294 updateMessage.AABBMax = landData.AABBMax;
@@ -5301,7 +5301,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5301 updateMessage.Category = landData.Category; 5301 updateMessage.Category = landData.Category;
5302 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); 5302 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
5303 updateMessage.ClaimPrice = landData.ClaimPrice; 5303 updateMessage.ClaimPrice = landData.ClaimPrice;
5304 updateMessage.GroupID = landData.GroupID; 5304 updateMessage.GroupID = landData.GroupID;
5305 updateMessage.IsGroupOwned = landData.IsGroupOwned; 5305 updateMessage.IsGroupOwned = landData.IsGroupOwned;
5306 updateMessage.LandingType = (LandingType) landData.LandingType; 5306 updateMessage.LandingType = (LandingType) landData.LandingType;
5307 updateMessage.LocalID = landData.LocalID; 5307 updateMessage.LocalID = landData.LocalID;
@@ -5322,7 +5322,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5322 updateMessage.Name = landData.Name; 5322 updateMessage.Name = landData.Name;
5323 updateMessage.OtherCleanTime = landData.OtherCleanTime; 5323 updateMessage.OtherCleanTime = landData.OtherCleanTime;
5324 updateMessage.OtherCount = 0; //TODO: Unimplemented 5324 updateMessage.OtherCount = 0; //TODO: Unimplemented
5325 updateMessage.OwnerID = landData.OwnerID; 5325 updateMessage.OwnerID = landData.OwnerID;
5326 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; 5326 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
5327 updateMessage.ParcelPrimBonus = simObjectBonusFactor; 5327 updateMessage.ParcelPrimBonus = simObjectBonusFactor;
5328 updateMessage.PassHours = landData.PassHours; 5328 updateMessage.PassHours = landData.PassHours;
@@ -5337,10 +5337,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5337 5337
5338 updateMessage.RentPrice = 0; 5338 updateMessage.RentPrice = 0;
5339 updateMessage.RequestResult = (ParcelResult) request_result; 5339 updateMessage.RequestResult = (ParcelResult) request_result;
5340 updateMessage.SalePrice = landData.SalePrice; 5340 updateMessage.SalePrice = landData.SalePrice;
5341 updateMessage.SelfCount = 0; //TODO: Unimplemented 5341 updateMessage.SelfCount = 0; //TODO: Unimplemented
5342 updateMessage.SequenceID = sequence_id; 5342 updateMessage.SequenceID = sequence_id;
5343 5343
5344 if (landData.SimwideArea > 0) 5344 if (landData.SimwideArea > 0)
5345 { 5345 {
5346 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount(); 5346 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount();
@@ -5349,7 +5349,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5349 { 5349 {
5350 updateMessage.SimWideMaxPrims = 0; 5350 updateMessage.SimWideMaxPrims = 0;
5351 } 5351 }
5352 5352
5353 updateMessage.SnapSelection = snap_selection; 5353 updateMessage.SnapSelection = snap_selection;
5354 updateMessage.SnapshotID = landData.SnapshotID; 5354 updateMessage.SnapshotID = landData.SnapshotID;
5355 updateMessage.Status = (ParcelStatus) landData.Status; 5355 updateMessage.Status = (ParcelStatus) landData.Status;
@@ -5367,11 +5367,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5367 updateMessage.SeeAVs = landData.SeeAVs; 5367 updateMessage.SeeAVs = landData.SeeAVs;
5368 updateMessage.AnyAVSounds = landData.AnyAVSounds; 5368 updateMessage.AnyAVSounds = landData.AnyAVSounds;
5369 updateMessage.GroupAVSounds = landData.GroupAVSounds; 5369 updateMessage.GroupAVSounds = landData.GroupAVSounds;
5370 5370
5371 IPrimCounts pc = lo.PrimCounts; 5371 IPrimCounts pc = lo.PrimCounts;
5372 updateMessage.OwnerPrims = pc.Owner; 5372 updateMessage.OwnerPrims = pc.Owner;
5373 updateMessage.GroupPrims = pc.Group; 5373 updateMessage.GroupPrims = pc.Group;
5374 updateMessage.OtherPrims = pc.Others; 5374 updateMessage.OtherPrims = pc.Others;
5375 updateMessage.SelectedPrims = pc.Selected; 5375 updateMessage.SelectedPrims = pc.Selected;
5376 updateMessage.TotalPrims = pc.Total; 5376 updateMessage.TotalPrims = pc.Total;
5377 updateMessage.SimWideTotalPrims = pc.Simulator; 5377 updateMessage.SimWideTotalPrims = pc.Simulator;
@@ -5384,8 +5384,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5384 if (eq != null) 5384 if (eq != null)
5385 { 5385 {
5386 eq.ParcelProperties(updateMessage, this.AgentId); 5386 eq.ParcelProperties(updateMessage, this.AgentId);
5387 } 5387 }
5388 else 5388 else
5389 { 5389 {
5390 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data."); 5390 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data.");
5391 } 5391 }
@@ -5422,7 +5422,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5422 public void SendForceClientSelectObjects(List<uint> ObjectIDs) 5422 public void SendForceClientSelectObjects(List<uint> ObjectIDs)
5423 { 5423 {
5424// m_log.DebugFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count); 5424// m_log.DebugFormat("[LLCLIENTVIEW] sending select with {0} objects", ObjectIDs.Count);
5425 5425
5426 bool firstCall = true; 5426 bool firstCall = true;
5427 const int MAX_OBJECTS_PER_PACKET = 251; 5427 const int MAX_OBJECTS_PER_PACKET = 251;
5428 ForceObjectSelectPacket pack = (ForceObjectSelectPacket)PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect); 5428 ForceObjectSelectPacket pack = (ForceObjectSelectPacket)PacketPool.Instance.GetPacket(PacketType.ForceObjectSelect);
@@ -5634,7 +5634,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5634 5634
5635 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block 5635 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block
5636 = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); 5636 = PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
5637 5637
5638 block.Data = data; 5638 block.Data = data;
5639 5639
5640 if (textureEntry != null && textureEntry.Length > 0) 5640 if (textureEntry != null && textureEntry.Length > 0)
@@ -5661,7 +5661,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5661 Vector3 offsetPosition = data.OffsetPosition; 5661 Vector3 offsetPosition = data.OffsetPosition;
5662 Quaternion rotation = data.Rotation; 5662 Quaternion rotation = data.Rotation;
5663 uint parentID = data.ParentID; 5663 uint parentID = data.ParentID;
5664 5664
5665// m_log.DebugFormat( 5665// m_log.DebugFormat(
5666// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name); 5666// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name);
5667 5667
@@ -5752,7 +5752,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5752/* 5752/*
5753 if (data.ParentGroup.IsAttachment) 5753 if (data.ParentGroup.IsAttachment)
5754 { 5754 {
5755 update.NameValue 5755 update.NameValue
5756 = Util.StringToBytes256( 5756 = Util.StringToBytes256(
5757 string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID)); 5757 string.Format("AttachItemID STRING RW SV {0}", data.ParentGroup.FromItemID));
5758 5758
@@ -5906,7 +5906,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5906 { 5906 {
5907 m_groupPowers.Clear(); 5907 m_groupPowers.Clear();
5908 m_groupPowers = powers; 5908 m_groupPowers = powers;
5909 } 5909 }
5910 } 5910 }
5911 5911
5912 public ulong GetGroupPowers(UUID groupID) 5912 public ulong GetGroupPowers(UUID groupID)
@@ -6193,7 +6193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6193 { 6193 {
6194 if( 6194 if(
6195 (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed 6195 (x.ControlFlags != m_thisAgentUpdateArgs.ControlFlags) // significant if control flags changed
6196// || ((x.ControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0 && 6196// || ((x.ControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0 &&
6197// (x.ControlFlags & 0x3f8dfff) != 0) // we need to rotate the av on fly 6197// (x.ControlFlags & 0x3f8dfff) != 0) // we need to rotate the av on fly
6198 || x.ControlFlags != (byte)AgentManager.ControlFlags.NONE// actually all movement controls need to pass 6198 || x.ControlFlags != (byte)AgentManager.ControlFlags.NONE// actually all movement controls need to pass
6199 || (x.Flags != m_thisAgentUpdateArgs.Flags) // significant if Flags changed 6199 || (x.Flags != m_thisAgentUpdateArgs.Flags) // significant if Flags changed
@@ -6208,7 +6208,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6208 if( 6208 if(
6209 qdelta1 < QDELTABody // significant if body rotation above(below cos) threshold 6209 qdelta1 < QDELTABody // significant if body rotation above(below cos) threshold
6210 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack 6210 // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
6211 // || qdelta2 < QDELTAHead // significant if head rotation above(below cos) threshold 6211 // || qdelta2 < QDELTAHead // significant if head rotation above(below cos) threshold
6212 ) 6212 )
6213 return true; 6213 return true;
6214 6214
@@ -6257,7 +6257,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6257 6257
6258 TotalAgentUpdates++; 6258 TotalAgentUpdates++;
6259 // dont let ignored updates pollute this throttles 6259 // dont let ignored updates pollute this throttles
6260 if(SceneAgent == null || SceneAgent.IsChildAgent || 6260 if(SceneAgent == null || SceneAgent.IsChildAgent ||
6261 SceneAgent.IsInTransit || seq <= m_thisAgentUpdateArgs.lastpacketSequence ) 6261 SceneAgent.IsInTransit || seq <= m_thisAgentUpdateArgs.lastpacketSequence )
6262 { 6262 {
6263 // throttle reset is done at MoveAgentIntoRegion() 6263 // throttle reset is done at MoveAgentIntoRegion()
@@ -6476,7 +6476,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6476 } 6476 }
6477 } 6477 }
6478 } 6478 }
6479 6479
6480 //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method); 6480 //m_log.Debug("[LLCLIENTVIEW]: Not handling GenericMessage with method-type of: " + method);
6481 return false; 6481 return false;
6482 } 6482 }
@@ -6922,7 +6922,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6922 //m_log.Info("[LAND]: LAND:" + modify.ToString()); 6922 //m_log.Info("[LAND]: LAND:" + modify.ToString());
6923 if (modify.ParcelData.Length > 0) 6923 if (modify.ParcelData.Length > 0)
6924 { 6924 {
6925 // Note: the ModifyTerrain event handler sends out updated packets before the end of this event. Therefore, 6925 // Note: the ModifyTerrain event handler sends out updated packets before the end of this event. Therefore,
6926 // a simple boolean value should work and perhaps queue up just a few terrain patch packets at the end of the edit. 6926 // a simple boolean value should work and perhaps queue up just a few terrain patch packets at the end of the edit.
6927 if (OnModifyTerrain != null) 6927 if (OnModifyTerrain != null)
6928 { 6928 {
@@ -6999,20 +6999,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6999 byte[] visualparams = new byte[appear.VisualParam.Length]; 6999 byte[] visualparams = new byte[appear.VisualParam.Length];
7000 for (int i = 0; i < appear.VisualParam.Length; i++) 7000 for (int i = 0; i < appear.VisualParam.Length; i++)
7001 visualparams[i] = appear.VisualParam[i].ParamValue; 7001 visualparams[i] = appear.VisualParam[i].ParamValue;
7002 //var b = appear.WearableData[0]; 7002 //var b = appear.WearableData[0];
7003 7003
7004 Primitive.TextureEntry te = null; 7004 Primitive.TextureEntry te = null;
7005 if (appear.ObjectData.TextureEntry.Length > 1) 7005 if (appear.ObjectData.TextureEntry.Length > 1)
7006 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); 7006 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
7007 7007
7008 WearableCacheItem[] cacheitems = new WearableCacheItem[appear.WearableData.Length]; 7008 WearableCacheItem[] cacheitems = new WearableCacheItem[appear.WearableData.Length];
7009 for (int i=0; i<appear.WearableData.Length;i++) 7009 for (int i=0; i<appear.WearableData.Length;i++)
7010 cacheitems[i] = new WearableCacheItem(){ 7010 cacheitems[i] = new WearableCacheItem(){
7011 CacheId = appear.WearableData[i].CacheID, 7011 CacheId = appear.WearableData[i].CacheID,
7012 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex) 7012 TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex)
7013 }; 7013 };
7014 7014
7015 7015
7016 7016
7017 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems); 7017 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems);
7018 } 7018 }
@@ -7970,7 +7970,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7970 physdata.Bounce = phsblock.Restitution; 7970 physdata.Bounce = phsblock.Restitution;
7971 physdata.Density = phsblock.Density; 7971 physdata.Density = phsblock.Density;
7972 physdata.Friction = phsblock.Friction; 7972 physdata.Friction = phsblock.Friction;
7973 physdata.GravitationModifier = phsblock.GravityMultiplier; 7973 physdata.GravitationModifier = phsblock.GravityMultiplier;
7974 } 7974 }
7975 7975
7976 handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this); 7976 handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, physdata, this);
@@ -8381,7 +8381,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8381 handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay; 8381 handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay;
8382 if (handlerObjectDuplicateOnRay != null) 8382 if (handlerObjectDuplicateOnRay != null)
8383 { 8383 {
8384 8384
8385 UUID rezGroupID = dupeOnRay.AgentData.GroupID; 8385 UUID rezGroupID = dupeOnRay.AgentData.GroupID;
8386 if(!IsGroupMember(rezGroupID)) 8386 if(!IsGroupMember(rezGroupID))
8387 rezGroupID = UUID.Zero; 8387 rezGroupID = UUID.Zero;
@@ -10198,7 +10198,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10198 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10198 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10199 { 10199 {
10200 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter)); 10200 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
10201 10201
10202 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter))); 10202 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
10203 10203
10204 } 10204 }
@@ -10234,7 +10234,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10234 Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter); 10234 Message = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
10235 } 10235 }
10236 else 10236 else
10237 { 10237 {
10238 SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); 10238 SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
10239 SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter); 10239 SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
10240 Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter); 10240 Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
@@ -10376,7 +10376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10376 return true; 10376 return true;
10377 10377
10378 case "kickestate": 10378 case "kickestate":
10379 10379
10380 if(((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 10380 if(((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
10381 { 10381 {
10382 UUID invoice = messagePacket.MethodData.Invoice; 10382 UUID invoice = messagePacket.MethodData.Invoice;
@@ -10459,7 +10459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10459 if (rglpPack.AgentData.SessionID != SessionId || 10459 if (rglpPack.AgentData.SessionID != SessionId ||
10460 rglpPack.AgentData.AgentID != AgentId) 10460 rglpPack.AgentData.AgentID != AgentId)
10461 return true; 10461 return true;
10462 10462
10463 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; 10463 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
10464 UUID token = rblock.Token; 10464 UUID token = rblock.Token;
10465 10465
@@ -10975,7 +10975,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10975 { 10975 {
10976 return true; 10976 return true;
10977 } 10977 }
10978 10978
10979 private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack) 10979 private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack)
10980 { 10980 {
10981 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack; 10981 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack;
@@ -11012,7 +11012,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11012 return true; 11012 return true;
11013 } 11013 }
11014 11014
11015 11015
11016 private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack) 11016 private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack)
11017 { 11017 {
11018 return true; 11018 return true;
@@ -11402,7 +11402,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11402 GroupProfileRequestPacket groupProfileRequest = 11402 GroupProfileRequestPacket groupProfileRequest =
11403 (GroupProfileRequestPacket)Pack; 11403 (GroupProfileRequestPacket)Pack;
11404 11404
11405 11405
11406 #region Packet Session and User Check 11406 #region Packet Session and User Check
11407 if (m_checkPackets) 11407 if (m_checkPackets)
11408 { 11408 {
@@ -11464,7 +11464,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11464 } 11464 }
11465 11465
11466 OutPacket(groupProfileReply, ThrottleOutPacketType.Task); 11466 OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
11467 11467
11468 if(grpID == lastGroupProfileRequestID) 11468 if(grpID == lastGroupProfileRequestID)
11469 lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000; 11469 lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000;
11470 11470
@@ -12398,10 +12398,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12398 ScenePresence sp = (ScenePresence)SceneAgent; 12398 ScenePresence sp = (ScenePresence)SceneAgent;
12399 if(sp != null && !sp.IsDeleted && !sp.IsInTransit) 12399 if(sp != null && !sp.IsDeleted && !sp.IsInTransit)
12400 { 12400 {
12401 UUID objectID = pkt.Data.ObjectID; 12401 UUID objectID = pkt.Data.ObjectID;
12402 uint permissions = pkt.Data.ObjectPermissions; 12402 uint permissions = pkt.Data.ObjectPermissions;
12403 12403
12404 sp.HandleRevokePermissions(objectID , permissions); 12404 sp.HandleRevokePermissions(objectID , permissions);
12405 } 12405 }
12406 return true; 12406 return true;
12407 } 12407 }
@@ -12437,7 +12437,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12437 scriptQuestion.Data.Questions = question; 12437 scriptQuestion.Data.Questions = question;
12438 scriptQuestion.Data.ObjectName = Util.StringToBytes256(taskName); 12438 scriptQuestion.Data.ObjectName = Util.StringToBytes256(taskName);
12439 scriptQuestion.Data.ObjectOwner = Util.StringToBytes256(ownerName); 12439 scriptQuestion.Data.ObjectOwner = Util.StringToBytes256(ownerName);
12440 12440
12441 OutPacket(scriptQuestion, ThrottleOutPacketType.Task); 12441 OutPacket(scriptQuestion, ThrottleOutPacketType.Task);
12442 } 12442 }
12443 12443
@@ -12629,7 +12629,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12629 * 0x01 position 12629 * 0x01 position
12630 * 0x02 rotation 12630 * 0x02 rotation
12631 * 0x04 scale 12631 * 0x04 scale
12632 12632
12633 * 0x08 LINK_SET 12633 * 0x08 LINK_SET
12634 * 0x10 UNIFORM for scale 12634 * 0x10 UNIFORM for scale
12635 */ 12635 */
@@ -12668,7 +12668,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12668 updatehandler(localId, udata, this); 12668 updatehandler(localId, udata, this);
12669 break; 12669 break;
12670 12670
12671 case 0x14: // uniform scale sp 12671 case 0x14: // uniform scale sp
12672 udata.scale = new Vector3(block.Data, 0); 12672 udata.scale = new Vector3(block.Data, 0);
12673 12673
12674 udata.change = ObjectChangeType.primUS; 12674 udata.change = ObjectChangeType.primUS;
@@ -12938,7 +12938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12938 12938
12939 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) 12939 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect))
12940 logPacket = false; 12940 logPacket = false;
12941 12941
12942 if (DebugPacketLevel <= 50 12942 if (DebugPacketLevel <= 50
12943 && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate)) 12943 && (packet.Type == PacketType.ImprovedTerseObjectUpdate || packet.Type == PacketType.ObjectUpdate))
12944 logPacket = false; 12944 logPacket = false;
@@ -12951,7 +12951,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12951 "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}", 12951 "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}",
12952 Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type); 12952 Name, SceneAgent.IsChildAgent ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
12953 } 12953 }
12954 12954
12955 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); 12955 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method);
12956 } 12956 }
12957 12957
@@ -13198,9 +13198,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13198 { 13198 {
13199 GroupMembershipData[] GroupMembership = 13199 GroupMembershipData[] GroupMembership =
13200 m_GroupsModule.GetMembershipData(AgentId); 13200 m_GroupsModule.GetMembershipData(AgentId);
13201 13201
13202 m_groupPowers.Clear(); 13202 m_groupPowers.Clear();
13203 13203
13204 if (GroupMembership != null) 13204 if (GroupMembership != null)
13205 { 13205 {
13206 for (int i = 0; i < GroupMembership.Length; i++) 13206 for (int i = 0; i < GroupMembership.Length; i++)
@@ -13220,7 +13220,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13220 m_activeGroupName = activeMembership.GroupName; 13220 m_activeGroupName = activeMembership.GroupName;
13221 m_activeGroupPowers = ActiveGroupPowers; 13221 m_activeGroupPowers = ActiveGroupPowers;
13222 } 13222 }
13223 } 13223 }
13224 } 13224 }
13225 13225
13226 if(activeMembership == null) 13226 if(activeMembership == null)
@@ -13237,7 +13237,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13237 lock(m_groupPowers) 13237 lock(m_groupPowers)
13238 { 13238 {
13239 m_groupPowers.Clear(); 13239 m_groupPowers.Clear();
13240 13240
13241 if (data != null) 13241 if (data != null)
13242 { 13242 {
13243 for (int i = 0; i < data.Length; i++) 13243 for (int i = 0; i < data.Length; i++)
@@ -13522,7 +13522,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13522 if (p is ScenePresence) 13522 if (p is ScenePresence)
13523 { 13523 {
13524// m_log.DebugFormat( 13524// m_log.DebugFormat(
13525// "[LLCLIENTVIEW]: Immediately sending terse agent update for {0} to {1} in {2}", 13525// "[LLCLIENTVIEW]: Immediately sending terse agent update for {0} to {1} in {2}",
13526// p.Name, Name, Scene.Name); 13526// p.Name, Name, Scene.Name);
13527 13527
13528 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities 13528 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities
@@ -13559,7 +13559,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13559 PlacesReplyData[] data) 13559 PlacesReplyData[] data)
13560 { 13560 {
13561 PlacesReplyPacket reply = null; 13561 PlacesReplyPacket reply = null;
13562 PlacesReplyPacket.QueryDataBlock[] dataBlocks = 13562 PlacesReplyPacket.QueryDataBlock[] dataBlocks =
13563 new PlacesReplyPacket.QueryDataBlock[0]; 13563 new PlacesReplyPacket.QueryDataBlock[0];
13564 13564
13565 for (int i = 0 ; i < data.Length ; i++) 13565 for (int i = 0 ; i < data.Length ; i++)
@@ -13737,7 +13737,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
13737 foreach (InventoryItemBase item in items) 13737 foreach (InventoryItemBase item in items)
13738 { 13738 {
13739 OSDMap ItemDataMap = new OSDMap(); 13739 OSDMap ItemDataMap = new OSDMap();
13740 13740
13741 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID)); 13741 ItemDataMap.Add("ItemID", OSD.FromUUID(item.ID));
13742 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder)); 13742 ItemDataMap.Add("FolderID", OSD.FromUUID(item.Folder));
13743 13743