aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-10-19 18:50:31 -0700
committerJohn Hurliman2009-10-19 18:50:31 -0700
commit0a6ea33ac8faa015ad8014b429be0046ba3b3e0a (patch)
tree452cddb4228162a25d363de7838b2cb7fc3af523 /OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
parent* Removed OpenSim.Data.NHibernate (diff)
downloadopensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.zip
opensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.tar.gz
opensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.tar.bz2
opensim-SC_OLD-0a6ea33ac8faa015ad8014b429be0046ba3b3e0a.tar.xz
* Optimized sending of terrain data
* Send terrain data in a spiral pattern instead of a typewriter pattern (placeholder until terrain data becomes part of the interest list management) * Added a debug line when resent packets are being sent
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs312
1 files changed, 166 insertions, 146 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index a966b42..88faccf 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -45,7 +45,7 @@ using OpenSim.Region.Framework.Interfaces;
45using OpenSim.Region.Framework.Scenes; 45using OpenSim.Region.Framework.Scenes;
46using OpenSim.Region.Framework.Scenes.Hypergrid; 46using OpenSim.Region.Framework.Scenes.Hypergrid;
47using OpenSim.Services.Interfaces; 47using OpenSim.Services.Interfaces;
48using Timer=System.Timers.Timer; 48using Timer = System.Timers.Timer;
49using AssetLandmark = OpenSim.Framework.AssetLandmark; 49using AssetLandmark = OpenSim.Framework.AssetLandmark;
50using Nini.Config; 50using Nini.Config;
51 51
@@ -342,7 +342,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
342 protected UUID m_activeGroupID; 342 protected UUID m_activeGroupID;
343 protected string m_activeGroupName = String.Empty; 343 protected string m_activeGroupName = String.Empty;
344 protected ulong m_activeGroupPowers; 344 protected ulong m_activeGroupPowers;
345 protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>(); 345 protected Dictionary<UUID, ulong> m_groupPowers = new Dictionary<UUID, ulong>();
346 protected int m_terrainCheckerCount; 346 protected int m_terrainCheckerCount;
347 protected uint m_agentFOVCounter; 347 protected uint m_agentFOVCounter;
348 348
@@ -621,7 +621,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
621 } 621 }
622 622
623 // Sound 623 // Sound
624 public void SoundTrigger(UUID soundId, UUID owerid, UUID Objectid,UUID ParentId,float Gain, Vector3 Position,UInt64 Handle) 624 public void SoundTrigger(UUID soundId, UUID owerid, UUID Objectid, UUID ParentId, float Gain, Vector3 Position, UInt64 Handle)
625 { 625 {
626 } 626 }
627 627
@@ -658,7 +658,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
658 handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting? 658 handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting?
659 handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block(); 659 handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block();
660 handshake.RegionInfo2.RegionID = regionInfo.RegionID; 660 handshake.RegionInfo2.RegionID = regionInfo.RegionID;
661 661
662 handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block(); 662 handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block();
663 handshake.RegionInfo3.CPUClassID = 9; 663 handshake.RegionInfo3.CPUClassID = 9;
664 handshake.RegionInfo3.CPURatio = 1; 664 handshake.RegionInfo3.CPURatio = 1;
@@ -800,32 +800,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP
800 /// <param name="o"></param> 800 /// <param name="o"></param>
801 private void DoSendLayerData(object o) 801 private void DoSendLayerData(object o)
802 { 802 {
803 float[] map = (float[])o; 803 float[] map = LLHeightFieldMoronize((float[])o);
804 804
805 try 805 try
806 { 806 {
807 for (int y = 0; y < 16; y++) 807 //for (int y = 0; y < 16; y++)
808 { 808 //{
809 // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception 809 // for (int x = 0; x < 16; x++)
810 // see http://opensimulator.org/mantis/view.php?id=1662 810 // {
811 //for (int x = 0; x < 16; x += 4) 811 // SendLayerData(x, y, map);
812 //{ 812 // }
813 // SendLayerPacket(map, y, x); 813 //}
814 // Thread.Sleep(150); 814
815 //} 815 // Send LayerData in a spiral pattern. Fun!
816 for (int x = 0; x < 16; x++) 816 SendLayerTopRight(map, 0, 0, 15, 15);
817 {
818 SendLayerData(x, y, LLHeightFieldMoronize(map));
819 Thread.Sleep(35);
820 }
821 }
822 } 817 }
823 catch (Exception e) 818 catch (Exception e)
824 { 819 {
825 m_log.Warn("[CLIENT]: ClientView.API.cs: SendLayerData() - Failed with exception " + e); 820 m_log.Error("[CLIENT]: SendLayerData() Failed with exception: " + e.Message, e);
826 } 821 }
827 } 822 }
828 823
824 private void SendLayerTopRight(float[] map, int x1, int y1, int x2, int y2)
825 {
826 // Row
827 for (int i = x1; i <= x2; i++)
828 SendLayerData(i, y1, map);
829
830 // Column
831 for (int j = y1 + 1; j <= y2; j++)
832 SendLayerData(x2, j, map);
833
834 if (x2 - x1 > 0)
835 SendLayerBottomLeft(map, x1, y1 + 1, x2 - 1, y2);
836 }
837
838 void SendLayerBottomLeft(float[] map, int x1, int y1, int x2, int y2)
839 {
840 // Row in reverse
841 for (int i = x2; i >= x1; i--)
842 SendLayerData(i, y2, map);
843
844 // Column in reverse
845 for (int j = y2 - 1; j >= y1; j--)
846 SendLayerData(x1, j, map);
847
848 if (x2 - x1 > 0)
849 SendLayerTopRight(map, x1 + 1, y1, x2, y2 - 1);
850 }
851
829 /// <summary> 852 /// <summary>
830 /// Sends a set of four patches (x, x+1, ..., x+3) to the client 853 /// Sends a set of four patches (x, x+1, ..., x+3) to the client
831 /// </summary> 854 /// </summary>
@@ -854,22 +877,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
854 { 877 {
855 try 878 try
856 { 879 {
857 int[] patches = new int[1]; 880 int[] patches = new int[] { py * 16 + px };
858 int patchx, patchy; 881 float[] heightmap = (map.Length == 65536) ?
859 patchx = px; 882 map :
860 patchy = py; 883 LLHeightFieldMoronize(map);
861 884
862 patches[0] = patchx + 0 + patchy * 16; 885 LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(heightmap, patches);
863 886 layerpack.Header.Reliable = true;
864 LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(((map.Length==65536)? map : LLHeightFieldMoronize(map)), patches);
865 layerpack.Header.Zerocoded = true;
866 887
867 OutPacket(layerpack, ThrottleOutPacketType.Land); 888 OutPacket(layerpack, ThrottleOutPacketType.Land);
868
869 } 889 }
870 catch (Exception e) 890 catch (Exception e)
871 { 891 {
872 m_log.Warn("[client]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); 892 m_log.Error("[CLIENT]: SendLayerData() Failed with exception: " + e.Message, e);
873 } 893 }
874 } 894 }
875 895
@@ -898,7 +918,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
898 Array.Copy(map, i * (int)Constants.RegionSize, returnmap, i * 256, 256); 918 Array.Copy(map, i * (int)Constants.RegionSize, returnmap, i * 256, 256);
899 } 919 }
900 920
901
902 //Array.Copy(map,0,returnmap,0,(map.Length < 65536)? map.Length : 65536); 921 //Array.Copy(map,0,returnmap,0,(map.Length < 65536)? map.Length : 65536);
903 922
904 return returnmap; 923 return returnmap;
@@ -1010,14 +1029,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1010 agentData.child = false; 1029 agentData.child = false;
1011 agentData.firstname = m_firstName; 1030 agentData.firstname = m_firstName;
1012 agentData.lastname = m_lastName; 1031 agentData.lastname = m_lastName;
1013 1032
1014 ICapabilitiesModule capsModule = m_scene.RequestModuleInterface<ICapabilitiesModule>(); 1033 ICapabilitiesModule capsModule = m_scene.RequestModuleInterface<ICapabilitiesModule>();
1015 1034
1016 if (capsModule == null) // can happen when shutting down. 1035 if (capsModule == null) // can happen when shutting down.
1017 return agentData; 1036 return agentData;
1018 1037
1019 agentData.CapsPath = capsModule.GetCapsPath(m_agentId); 1038 agentData.CapsPath = capsModule.GetCapsPath(m_agentId);
1020 agentData.ChildrenCapSeeds = new Dictionary<ulong,string>(capsModule.GetChildrenSeeds(m_agentId)); 1039 agentData.ChildrenCapSeeds = new Dictionary<ulong, string>(capsModule.GetChildrenSeeds(m_agentId));
1021 1040
1022 return agentData; 1041 return agentData;
1023 } 1042 }
@@ -1213,7 +1232,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1213 1232
1214 pc.PingID.PingID = seq; 1233 pc.PingID.PingID = seq;
1215 pc.PingID.OldestUnacked = (oldestPacket != null) ? oldestPacket.SequenceNumber : 0; 1234 pc.PingID.OldestUnacked = (oldestPacket != null) ? oldestPacket.SequenceNumber : 0;
1216 1235
1217 OutPacket(pc, ThrottleOutPacketType.Unknown); 1236 OutPacket(pc, ThrottleOutPacketType.Unknown);
1218 } 1237 }
1219 1238
@@ -1519,7 +1538,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1519 inventoryReply.Header.Zerocoded = true; 1538 inventoryReply.Header.Zerocoded = true;
1520 OutPacket(inventoryReply, ThrottleOutPacketType.Asset); 1539 OutPacket(inventoryReply, ThrottleOutPacketType.Asset);
1521 } 1540 }
1522 1541
1523 protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) 1542 protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase)
1524 { 1543 {
1525 // We will use the same transaction id for all the separate packets to be sent out in this update. 1544 // We will use the same transaction id for all the separate packets to be sent out in this update.
@@ -1543,7 +1562,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1543 bulkUpdate.FolderData = folderDataBlocks.ToArray(); 1562 bulkUpdate.FolderData = folderDataBlocks.ToArray();
1544 List<BulkUpdateInventoryPacket.ItemDataBlock> foo = new List<BulkUpdateInventoryPacket.ItemDataBlock>(); 1563 List<BulkUpdateInventoryPacket.ItemDataBlock> foo = new List<BulkUpdateInventoryPacket.ItemDataBlock>();
1545 bulkUpdate.ItemData = foo.ToArray(); 1564 bulkUpdate.ItemData = foo.ToArray();
1546 1565
1547 //m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate); 1566 //m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate);
1548 OutPacket(bulkUpdate, ThrottleOutPacketType.Asset); 1567 OutPacket(bulkUpdate, ThrottleOutPacketType.Asset);
1549 } 1568 }
@@ -1666,7 +1685,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1666 1685
1667 return itemBlock; 1686 return itemBlock;
1668 } 1687 }
1669 1688
1670 public void SendBulkUpdateInventory(InventoryNodeBase node) 1689 public void SendBulkUpdateInventory(InventoryNodeBase node)
1671 { 1690 {
1672 if (node is InventoryItemBase) 1691 if (node is InventoryItemBase)
@@ -1676,7 +1695,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1676 else 1695 else
1677 m_log.ErrorFormat("[CLIENT]: Client for {0} sent unknown inventory node named {1}", Name, node.Name); 1696 m_log.ErrorFormat("[CLIENT]: Client for {0} sent unknown inventory node named {1}", Name, node.Name);
1678 } 1697 }
1679 1698
1680 protected void SendBulkUpdateInventoryItem(InventoryItemBase item) 1699 protected void SendBulkUpdateInventoryItem(InventoryItemBase item)
1681 { 1700 {
1682 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All; 1701 const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
@@ -3100,9 +3119,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3100 awb.ItemID = wearables[i].ItemID; 3119 awb.ItemID = wearables[i].ItemID;
3101 aw.WearableData[i] = awb; 3120 aw.WearableData[i] = awb;
3102 3121
3103// m_log.DebugFormat( 3122 // m_log.DebugFormat(
3104// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", 3123 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
3105// awb.ItemID, awb.AssetID, i, Name); 3124 // awb.ItemID, awb.AssetID, i, Name);
3106 } 3125 }
3107 3126
3108 OutPacket(aw, ThrottleOutPacketType.Task); 3127 OutPacket(aw, ThrottleOutPacketType.Task);
@@ -3270,7 +3289,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3270 3289
3271 objupdate.RegionData.RegionHandle = data.RegionHandle; 3290 objupdate.RegionData.RegionHandle = data.RegionHandle;
3272 objupdate.RegionData.TimeDilation = ushort.MaxValue; 3291 objupdate.RegionData.TimeDilation = ushort.MaxValue;
3273 3292
3274 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 3293 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
3275 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data); 3294 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data);
3276 3295
@@ -3343,7 +3362,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3343 { 3362 {
3344 CoarseLocationUpdatePacket.LocationBlock lb = 3363 CoarseLocationUpdatePacket.LocationBlock lb =
3345 new CoarseLocationUpdatePacket.LocationBlock(); 3364 new CoarseLocationUpdatePacket.LocationBlock();
3346 3365
3347 lb.X = (byte)CoarseLocations[i].X; 3366 lb.X = (byte)CoarseLocations[i].X;
3348 lb.Y = (byte)CoarseLocations[i].Y; 3367 lb.Y = (byte)CoarseLocations[i].Y;
3349 3368
@@ -3620,7 +3639,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3620 newPack.Header.Zerocoded = true; 3639 newPack.Header.Zerocoded = true;
3621 OutPacket(newPack, ThrottleOutPacketType.Asset); 3640 OutPacket(newPack, ThrottleOutPacketType.Asset);
3622 } 3641 }
3623 3642
3624 public void SendInitiateDownload(string simFileName, string clientFileName) 3643 public void SendInitiateDownload(string simFileName, string clientFileName)
3625 { 3644 {
3626 InitiateDownloadPacket newPack = new InitiateDownloadPacket(); 3645 InitiateDownloadPacket newPack = new InitiateDownloadPacket();
@@ -3629,7 +3648,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3629 newPack.FileData.ViewerFilename = Utils.StringToBytes(clientFileName); 3648 newPack.FileData.ViewerFilename = Utils.StringToBytes(clientFileName);
3630 OutPacket(newPack, ThrottleOutPacketType.Asset); 3649 OutPacket(newPack, ThrottleOutPacketType.Asset);
3631 } 3650 }
3632 3651
3633 public void SendImageFirstPart( 3652 public void SendImageFirstPart(
3634 ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 3653 ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
3635 { 3654 {
@@ -3817,7 +3836,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3817 3836
3818 public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID) 3837 public void SendBannedUserList(UUID invoice, EstateBan[] bl, uint estateID)
3819 { 3838 {
3820 List<UUID>BannedUsers = new List<UUID>(); 3839 List<UUID> BannedUsers = new List<UUID>();
3821 3840
3822 for (int i = 0; i < bl.Length; i++) 3841 for (int i = 0; i < bl.Length; i++)
3823 { 3842 {
@@ -3881,7 +3900,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3881 rinfoblk.UseEstateSun = args.useEstateSun; 3900 rinfoblk.UseEstateSun = args.useEstateSun;
3882 rinfoblk.WaterHeight = args.waterHeight; 3901 rinfoblk.WaterHeight = args.waterHeight;
3883 rinfoblk.SimName = Utils.StringToBytes(args.simName); 3902 rinfoblk.SimName = Utils.StringToBytes(args.simName);
3884 3903
3885 rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block(); 3904 rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block();
3886 rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue; 3905 rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue;
3887 rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue; 3906 rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue;
@@ -4128,7 +4147,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4128 4147
4129 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount) 4148 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
4130 { 4149 {
4131 4150
4132 4151
4133 int notifyCount = ownersAndCount.Count; 4152 int notifyCount = ownersAndCount.Count;
4134 ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply); 4153 ParcelObjectOwnersReplyPacket pack = (ParcelObjectOwnersReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelObjectOwnersReply);
@@ -4208,7 +4227,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4208 4227
4209 if (collisionPlane == Vector4.Zero) 4228 if (collisionPlane == Vector4.Zero)
4210 collisionPlane = Vector4.UnitW; 4229 collisionPlane = Vector4.UnitW;
4211 4230
4212 collisionPlane.ToBytes(data, pos); 4231 collisionPlane.ToBytes(data, pos);
4213 pos += 16; 4232 pos += 16;
4214 } 4233 }
@@ -4297,7 +4316,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4297 update.TextureAnim = Utils.EmptyBytes; 4316 update.TextureAnim = Utils.EmptyBytes;
4298 update.TextureEntry = data.TextureEntry ?? Utils.EmptyBytes; 4317 update.TextureEntry = data.TextureEntry ?? Utils.EmptyBytes;
4299 update.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); // TODO: Replace these numbers with PrimFlags 4318 update.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); // TODO: Replace these numbers with PrimFlags
4300 4319
4301 return update; 4320 return update;
4302 } 4321 }
4303 4322
@@ -4448,7 +4467,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4448 4467
4449 private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack) 4468 private bool HandleMoneyTransferRequest(IClientAPI sender, Packet Pack)
4450 { 4469 {
4451 MoneyTransferRequestPacket money = (MoneyTransferRequestPacket) Pack; 4470 MoneyTransferRequestPacket money = (MoneyTransferRequestPacket)Pack;
4452 // validate the agent owns the agentID and sessionID 4471 // validate the agent owns the agentID and sessionID
4453 if (money.MoneyData.SourceID == sender.AgentId && money.AgentData.AgentID == sender.AgentId && 4472 if (money.MoneyData.SourceID == sender.AgentId && money.AgentData.AgentID == sender.AgentId &&
4454 money.AgentData.SessionID == sender.SessionId) 4473 money.AgentData.SessionID == sender.SessionId)
@@ -4469,7 +4488,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4469 4488
4470 private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) 4489 private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack)
4471 { 4490 {
4472 ParcelBuyPacket parcel = (ParcelBuyPacket) Pack; 4491 ParcelBuyPacket parcel = (ParcelBuyPacket)Pack;
4473 if (parcel.AgentData.AgentID == AgentId && parcel.AgentData.SessionID == SessionId) 4492 if (parcel.AgentData.AgentID == AgentId && parcel.AgentData.SessionID == SessionId)
4474 { 4493 {
4475 ParcelBuy handlerParcelBuy = OnParcelBuy; 4494 ParcelBuy handlerParcelBuy = OnParcelBuy;
@@ -4489,7 +4508,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4489 private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack) 4508 private bool HandleUUIDGroupNameRequest(IClientAPI sender, Packet Pack)
4490 { 4509 {
4491 UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack; 4510 UUIDGroupNameRequestPacket upack = (UUIDGroupNameRequestPacket)Pack;
4492 4511
4493 4512
4494 for (int i = 0; i < upack.UUIDNameBlock.Length; i++) 4513 for (int i = 0; i < upack.UUIDNameBlock.Length; i++)
4495 { 4514 {
@@ -4505,7 +4524,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4505 4524
4506 public bool HandleGenericMessage(IClientAPI sender, Packet pack) 4525 public bool HandleGenericMessage(IClientAPI sender, Packet pack)
4507 { 4526 {
4508 GenericMessagePacket gmpack = (GenericMessagePacket) pack; 4527 GenericMessagePacket gmpack = (GenericMessagePacket)pack;
4509 if (m_genericPacketHandlers.Count == 0) return false; 4528 if (m_genericPacketHandlers.Count == 0) return false;
4510 if (gmpack.AgentData.SessionID != SessionId) return false; 4529 if (gmpack.AgentData.SessionID != SessionId) return false;
4511 4530
@@ -4642,7 +4661,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4642 { 4661 {
4643 if (((LogoutRequestPacket)packet).AgentData.SessionID != SessionId) return false; 4662 if (((LogoutRequestPacket)packet).AgentData.SessionID != SessionId) return false;
4644 } 4663 }
4645 4664
4646 return Logout(client); 4665 return Logout(client);
4647 } 4666 }
4648 4667
@@ -4700,7 +4719,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4700 4719
4701 cachedresp.Header.Zerocoded = true; 4720 cachedresp.Header.Zerocoded = true;
4702 OutPacket(cachedresp, ThrottleOutPacketType.Task); 4721 OutPacket(cachedresp, ThrottleOutPacketType.Task);
4703 4722
4704 return true; 4723 return true;
4705 } 4724 }
4706 4725
@@ -4750,7 +4769,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4750 UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; 4769 UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
4751 if (handlerUpdatePrimSingleRotation != null) 4770 if (handlerUpdatePrimSingleRotation != null)
4752 { 4771 {
4753 // m_log.Info("new tab rotation is " + rot1.X + " , " + rot1.Y + " , " + rot1.Z + " , " + rot1.W); 4772 // m_log.Info("new tab rotation is " + rot1.X + " , " + rot1.Y + " , " + rot1.Z + " , " + rot1.W);
4754 handlerUpdatePrimSingleRotation(localId, rot1, this); 4773 handlerUpdatePrimSingleRotation(localId, rot1, this);
4755 } 4774 }
4756 break; 4775 break;
@@ -4761,8 +4780,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4761 UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition; 4780 UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition;
4762 if (handlerUpdatePrimSingleRotationPosition != null) 4781 if (handlerUpdatePrimSingleRotationPosition != null)
4763 { 4782 {
4764 // m_log.Debug("new mouse rotation position is " + rotPos.X + " , " + rotPos.Y + " , " + rotPos.Z); 4783 // m_log.Debug("new mouse rotation position is " + rotPos.X + " , " + rotPos.Y + " , " + rotPos.Z);
4765 // m_log.Info("new mouse rotation is " + rot2.X + " , " + rot2.Y + " , " + rot2.Z + " , " + rot2.W); 4784 // m_log.Info("new mouse rotation is " + rot2.X + " , " + rot2.Y + " , " + rot2.Z + " , " + rot2.W);
4766 handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this); 4785 handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this);
4767 } 4786 }
4768 break; 4787 break;
@@ -4773,7 +4792,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4773 UpdateVector handlerUpdatePrimScale = OnUpdatePrimScale; 4792 UpdateVector handlerUpdatePrimScale = OnUpdatePrimScale;
4774 if (handlerUpdatePrimScale != null) 4793 if (handlerUpdatePrimScale != null)
4775 { 4794 {
4776// m_log.Debug("new scale is " + scale4.X + " , " + scale4.Y + " , " + scale4.Z); 4795 // m_log.Debug("new scale is " + scale4.X + " , " + scale4.Y + " , " + scale4.Z);
4777 handlerUpdatePrimScale(localId, scale4, this); 4796 handlerUpdatePrimScale(localId, scale4, this);
4778 } 4797 }
4779 break; 4798 break;
@@ -4812,7 +4831,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4812 UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; 4831 UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
4813 if (handlerUpdatePrimRotation != null) 4832 if (handlerUpdatePrimRotation != null)
4814 { 4833 {
4815 // Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W); 4834 // Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W);
4816 handlerUpdatePrimRotation(localId, rot3, this); 4835 handlerUpdatePrimRotation(localId, rot3, this);
4817 } 4836 }
4818 break; 4837 break;
@@ -4823,8 +4842,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4823 handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; 4842 handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
4824 if (handlerUpdatePrimGroupRotation != null) 4843 if (handlerUpdatePrimGroupRotation != null)
4825 { 4844 {
4826 // m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 4845 // m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
4827 // m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W); 4846 // m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W);
4828 handlerUpdatePrimGroupRotation(localId, pos3, rot4, this); 4847 handlerUpdatePrimGroupRotation(localId, pos3, rot4, this);
4829 } 4848 }
4830 break; 4849 break;
@@ -4835,7 +4854,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4835 UpdateVector handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale; 4854 UpdateVector handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
4836 if (handlerUpdatePrimGroupScale != null) 4855 if (handlerUpdatePrimGroupScale != null)
4837 { 4856 {
4838// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z); 4857 // m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
4839 handlerUpdatePrimGroupScale(localId, scale7, this); 4858 handlerUpdatePrimGroupScale(localId, scale7, this);
4840 } 4859 }
4841 break; 4860 break;
@@ -5067,7 +5086,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5067 // Main packet processing conditional 5086 // Main packet processing conditional
5068 switch (Pack.Type) 5087 switch (Pack.Type)
5069 { 5088 {
5070 #region Scene/Avatar 5089 #region Scene/Avatar
5071 5090
5072 case PacketType.AvatarPropertiesRequest: 5091 case PacketType.AvatarPropertiesRequest:
5073 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; 5092 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
@@ -5318,7 +5337,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5318 break; 5337 break;
5319 5338
5320 case PacketType.DeRezObject: 5339 case PacketType.DeRezObject:
5321 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket) Pack; 5340 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
5322 5341
5323 #region Packet Session and User Check 5342 #region Packet Session and User Check
5324 if (m_checkPackets) 5343 if (m_checkPackets)
@@ -5339,13 +5358,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5339 { 5358 {
5340 deRezIDs.Add(data.ObjectLocalID); 5359 deRezIDs.Add(data.ObjectLocalID);
5341 } 5360 }
5342 // It just so happens that the values on the DeRezAction enumerator match the Destination 5361 // It just so happens that the values on the DeRezAction enumerator match the Destination
5343 // values given by a Second Life client 5362 // values given by a Second Life client
5344 handlerDeRezObject(this, deRezIDs, 5363 handlerDeRezObject(this, deRezIDs,
5345 DeRezPacket.AgentBlock.GroupID, 5364 DeRezPacket.AgentBlock.GroupID,
5346 (DeRezAction)DeRezPacket.AgentBlock.Destination, 5365 (DeRezAction)DeRezPacket.AgentBlock.Destination,
5347 DeRezPacket.AgentBlock.DestinationID); 5366 DeRezPacket.AgentBlock.DestinationID);
5348 5367
5349 } 5368 }
5350 break; 5369 break;
5351 5370
@@ -5449,7 +5468,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5449 } 5468 }
5450 5469
5451 break; 5470 break;
5452 5471
5453 case PacketType.AgentIsNowWearing: 5472 case PacketType.AgentIsNowWearing:
5454 if (OnAvatarNowWearing != null) 5473 if (OnAvatarNowWearing != null)
5455 { 5474 {
@@ -5653,7 +5672,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5653 5672
5654 if (lastarg != null) 5673 if (lastarg != null)
5655 { 5674 {
5656 update = 5675 update =
5657 ( 5676 (
5658 (x.BodyRotation != lastarg.BodyRotation) || 5677 (x.BodyRotation != lastarg.BodyRotation) ||
5659 (x.CameraAtAxis != lastarg.CameraAtAxis) || 5678 (x.CameraAtAxis != lastarg.CameraAtAxis) ||
@@ -5846,7 +5865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5846 } 5865 }
5847 5866
5848 break; 5867 break;
5849 5868
5850 case PacketType.UserInfoRequest: 5869 case PacketType.UserInfoRequest:
5851 UserInfoRequest handlerUserInfoRequest = OnUserInfoRequest; 5870 UserInfoRequest handlerUserInfoRequest = OnUserInfoRequest;
5852 if (handlerUserInfoRequest != null) 5871 if (handlerUserInfoRequest != null)
@@ -5858,7 +5877,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5858 SendUserInfoReply(false, true, ""); 5877 SendUserInfoReply(false, true, "");
5859 } 5878 }
5860 break; 5879 break;
5861 5880
5862 case PacketType.UpdateUserInfo: 5881 case PacketType.UpdateUserInfo:
5863 UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack; 5882 UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack;
5864 5883
@@ -5885,7 +5904,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5885 visible, this); 5904 visible, this);
5886 } 5905 }
5887 break; 5906 break;
5888 5907
5889 case PacketType.SetStartLocationRequest: 5908 case PacketType.SetStartLocationRequest:
5890 SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; 5909 SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack;
5891 5910
@@ -5943,9 +5962,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5943 } 5962 }
5944 break; 5963 break;
5945 5964
5946 #endregion 5965 #endregion
5947 5966
5948 #region Objects/m_sceneObjects 5967 #region Objects/m_sceneObjects
5949 5968
5950 case PacketType.ObjectLink: 5969 case PacketType.ObjectLink:
5951 ObjectLinkPacket link = (ObjectLinkPacket)Pack; 5970 ObjectLinkPacket link = (ObjectLinkPacket)Pack;
@@ -5976,7 +5995,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5976 handlerLinkObjects(this, parentprimid, childrenprims); 5995 handlerLinkObjects(this, parentprimid, childrenprims);
5977 } 5996 }
5978 break; 5997 break;
5979 5998
5980 case PacketType.ObjectDelink: 5999 case PacketType.ObjectDelink:
5981 ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack; 6000 ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack;
5982 6001
@@ -6005,7 +6024,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6005 } 6024 }
6006 6025
6007 break; 6026 break;
6008 6027
6009 case PacketType.ObjectAdd: 6028 case PacketType.ObjectAdd:
6010 if (OnAddPrim != null) 6029 if (OnAddPrim != null)
6011 { 6030 {
@@ -6035,7 +6054,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6035 handlerAddPrim(AgentId, ActiveGroupId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection); 6054 handlerAddPrim(AgentId, ActiveGroupId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection);
6036 } 6055 }
6037 break; 6056 break;
6038 6057
6039 case PacketType.ObjectShape: 6058 case PacketType.ObjectShape:
6040 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack; 6059 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack;
6041 6060
@@ -6080,7 +6099,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6080 } 6099 }
6081 } 6100 }
6082 break; 6101 break;
6083 6102
6084 case PacketType.ObjectExtraParams: 6103 case PacketType.ObjectExtraParams:
6085 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack; 6104 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack;
6086 6105
@@ -6096,7 +6115,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6096 ObjectExtraParams handlerUpdateExtraParams = OnUpdateExtraParams; 6115 ObjectExtraParams handlerUpdateExtraParams = OnUpdateExtraParams;
6097 if (handlerUpdateExtraParams != null) 6116 if (handlerUpdateExtraParams != null)
6098 { 6117 {
6099 for (int i = 0 ; i < extraPar.ObjectData.Length ; i++) 6118 for (int i = 0; i < extraPar.ObjectData.Length; i++)
6100 { 6119 {
6101 handlerUpdateExtraParams(m_agentId, extraPar.ObjectData[i].ObjectLocalID, 6120 handlerUpdateExtraParams(m_agentId, extraPar.ObjectData[i].ObjectLocalID,
6102 extraPar.ObjectData[i].ParamType, 6121 extraPar.ObjectData[i].ParamType,
@@ -6497,7 +6516,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6497 break; 6516 break;
6498 case PacketType.ObjectName: 6517 case PacketType.ObjectName:
6499 ObjectNamePacket objName = (ObjectNamePacket)Pack; 6518 ObjectNamePacket objName = (ObjectNamePacket)Pack;
6500 6519
6501 #region Packet Session and User Check 6520 #region Packet Session and User Check
6502 if (m_checkPackets) 6521 if (m_checkPackets)
6503 { 6522 {
@@ -6506,7 +6525,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6506 break; 6525 break;
6507 } 6526 }
6508 #endregion 6527 #endregion
6509 6528
6510 GenericCall7 handlerObjectName = null; 6529 GenericCall7 handlerObjectName = null;
6511 for (int i = 0; i < objName.ObjectData.Length; i++) 6530 for (int i = 0; i < objName.ObjectData.Length; i++)
6512 { 6531 {
@@ -6739,14 +6758,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6739 } 6758 }
6740 break; 6759 break;
6741 6760
6742 #endregion 6761 #endregion
6743 6762
6744 #region Inventory/Asset/Other related packets 6763 #region Inventory/Asset/Other related packets
6745 6764
6746 case PacketType.RequestImage: 6765 case PacketType.RequestImage:
6747 RequestImagePacket imageRequest = (RequestImagePacket)Pack; 6766 RequestImagePacket imageRequest = (RequestImagePacket)Pack;
6748 //m_log.Debug("image request: " + Pack.ToString()); 6767 //m_log.Debug("image request: " + Pack.ToString());
6749 6768
6750 #region Packet Session and User Check 6769 #region Packet Session and User Check
6751 if (m_checkPackets) 6770 if (m_checkPackets)
6752 { 6771 {
@@ -6770,7 +6789,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6770 //handlerTextureRequest = OnRequestTexture; 6789 //handlerTextureRequest = OnRequestTexture;
6771 6790
6772 //if (handlerTextureRequest != null) 6791 //if (handlerTextureRequest != null)
6773 //OnRequestTexture(this, args); 6792 //OnRequestTexture(this, args);
6774 6793
6775 // in the end, we null this, so we have to check if it's null 6794 // in the end, we null this, so we have to check if it's null
6776 if (m_imageManager != null) 6795 if (m_imageManager != null)
@@ -6816,7 +6835,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6816 if (ti.OwnerID != AgentId) 6835 if (ti.OwnerID != AgentId)
6817 break; 6836 break;
6818 6837
6819 if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) 6838 if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
6820 break; 6839 break;
6821 6840
6822 if (ti.AssetID != requestID) 6841 if (ti.AssetID != requestID)
@@ -6874,7 +6893,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6874 case PacketType.AssetUploadRequest: 6893 case PacketType.AssetUploadRequest:
6875 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; 6894 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
6876 6895
6877 6896
6878 // m_log.Debug("upload request " + request.ToString()); 6897 // m_log.Debug("upload request " + request.ToString());
6879 // m_log.Debug("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); 6898 // m_log.Debug("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
6880 UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); 6899 UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
@@ -6891,7 +6910,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6891 break; 6910 break;
6892 case PacketType.RequestXfer: 6911 case PacketType.RequestXfer:
6893 RequestXferPacket xferReq = (RequestXferPacket)Pack; 6912 RequestXferPacket xferReq = (RequestXferPacket)Pack;
6894 6913
6895 RequestXfer handlerRequestXfer = OnRequestXfer; 6914 RequestXfer handlerRequestXfer = OnRequestXfer;
6896 6915
6897 if (handlerRequestXfer != null) 6916 if (handlerRequestXfer != null)
@@ -6910,7 +6929,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6910 break; 6929 break;
6911 case PacketType.ConfirmXferPacket: 6930 case PacketType.ConfirmXferPacket:
6912 ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack; 6931 ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack;
6913 6932
6914 ConfirmXfer handlerConfirmXfer = OnConfirmXfer; 6933 ConfirmXfer handlerConfirmXfer = OnConfirmXfer;
6915 if (handlerConfirmXfer != null) 6934 if (handlerConfirmXfer != null)
6916 { 6935 {
@@ -7005,7 +7024,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7005 break; 7024 break;
7006 case PacketType.CreateInventoryItem: 7025 case PacketType.CreateInventoryItem:
7007 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; 7026 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
7008 7027
7009 #region Packet Session and User Check 7028 #region Packet Session and User Check
7010 if (m_checkPackets) 7029 if (m_checkPackets)
7011 { 7030 {
@@ -7098,7 +7117,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7098 break; 7117 break;
7099 case PacketType.UpdateInventoryItem: 7118 case PacketType.UpdateInventoryItem:
7100 UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack; 7119 UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack;
7101 7120
7102 #region Packet Session and User Check 7121 #region Packet Session and User Check
7103 if (m_checkPackets) 7122 if (m_checkPackets)
7104 { 7123 {
@@ -7590,7 +7609,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7590 } 7609 }
7591 break; 7610 break;
7592 7611
7593 #endregion 7612 #endregion
7594 7613
7595 case PacketType.UUIDNameRequest: 7614 case PacketType.UUIDNameRequest:
7596 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; 7615 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
@@ -7605,7 +7624,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7605 } 7624 }
7606 break; 7625 break;
7607 7626
7608 #region Parcel related packets 7627 #region Parcel related packets
7609 7628
7610 case PacketType.RegionHandleRequest: 7629 case PacketType.RegionHandleRequest:
7611 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; 7630 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
@@ -7986,9 +8005,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7986 } 8005 }
7987 break; 8006 break;
7988 8007
7989 #endregion 8008 #endregion
7990 8009
7991 #region Estate Packets 8010 #region Estate Packets
7992 8011
7993 case PacketType.EstateOwnerMessage: 8012 case PacketType.EstateOwnerMessage:
7994 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; 8013 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
@@ -8022,21 +8041,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8022 convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); 8041 convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
8023 } 8042 }
8024 break; 8043 break;
8025// case "texturebase": 8044 // case "texturebase":
8026// if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 8045 // if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8027// { 8046 // {
8028// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) 8047 // foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
8029// { 8048 // {
8030// string s = Utils.BytesToString(block.Parameter); 8049 // string s = Utils.BytesToString(block.Parameter);
8031// string[] splitField = s.Split(' '); 8050 // string[] splitField = s.Split(' ');
8032// if (splitField.Length == 2) 8051 // if (splitField.Length == 2)
8033// { 8052 // {
8034// UUID tempUUID = new UUID(splitField[1]); 8053 // UUID tempUUID = new UUID(splitField[1]);
8035// OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID); 8054 // OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
8036// } 8055 // }
8037// } 8056 // }
8038// } 8057 // }
8039// break; 8058 // break;
8040 case "texturedetail": 8059 case "texturedetail":
8041 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false)) 8060 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8042 { 8061 {
@@ -8278,7 +8297,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8278 m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket); 8297 m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket);
8279 break; 8298 break;
8280 } 8299 }
8281 8300
8282 //int parcelID, uint reportType, uint requestflags, string filter 8301 //int parcelID, uint reportType, uint requestflags, string filter
8283 8302
8284 //lsrp.RequestData.ParcelLocalID; 8303 //lsrp.RequestData.ParcelLocalID;
@@ -8318,9 +8337,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8318 } 8337 }
8319 break; 8338 break;
8320 8339
8321 #endregion 8340 #endregion
8322 8341
8323 #region GodPackets 8342 #region GodPackets
8324 8343
8325 case PacketType.RequestGodlikePowers: 8344 case PacketType.RequestGodlikePowers:
8326 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; 8345 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
@@ -8366,9 +8385,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8366 //OutPacket(kupack, ThrottleOutPacketType.Task); 8385 //OutPacket(kupack, ThrottleOutPacketType.Task);
8367 break; 8386 break;
8368 8387
8369 #endregion 8388 #endregion
8370 8389
8371 #region Economy/Transaction Packets 8390 #region Economy/Transaction Packets
8372 8391
8373 case PacketType.MoneyBalanceRequest: 8392 case PacketType.MoneyBalanceRequest:
8374 MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; 8393 MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
@@ -8392,7 +8411,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8392 break; 8411 break;
8393 case PacketType.EconomyDataRequest: 8412 case PacketType.EconomyDataRequest:
8394 8413
8395 8414
8396 EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest; 8415 EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest;
8397 if (handlerEconomoyDataRequest != null) 8416 if (handlerEconomoyDataRequest != null)
8398 { 8417 {
@@ -8468,9 +8487,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8468 } 8487 }
8469 break; 8488 break;
8470 8489
8471 #endregion 8490 #endregion
8472 8491
8473 #region Script Packets 8492 #region Script Packets
8474 8493
8475 case PacketType.GetScriptRunning: 8494 case PacketType.GetScriptRunning:
8476 GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack; 8495 GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
@@ -8520,9 +8539,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8520 } 8539 }
8521 break; 8540 break;
8522 8541
8523 #endregion 8542 #endregion
8524 8543
8525 #region Gesture Managment 8544 #region Gesture Managment
8526 8545
8527 case PacketType.ActivateGestures: 8546 case PacketType.ActivateGestures:
8528 ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack; 8547 ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
@@ -8589,7 +8608,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8589 } 8608 }
8590 break; 8609 break;
8591 8610
8592 #endregion 8611 #endregion
8593 8612
8594 case PacketType.AgentFOV: 8613 case PacketType.AgentFOV:
8595 AgentFOVPacket fovPacket = (AgentFOVPacket)Pack; 8614 AgentFOVPacket fovPacket = (AgentFOVPacket)Pack;
@@ -8605,7 +8624,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8605 } 8624 }
8606 break; 8625 break;
8607 8626
8608 #region unimplemented handlers 8627 #region unimplemented handlers
8609 8628
8610 case PacketType.ViewerStats: 8629 case PacketType.ViewerStats:
8611 // TODO: handle this packet 8630 // TODO: handle this packet
@@ -8628,8 +8647,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8628 MapItemRequest handlerMapItemRequest = OnMapItemRequest; 8647 MapItemRequest handlerMapItemRequest = OnMapItemRequest;
8629 if (handlerMapItemRequest != null) 8648 if (handlerMapItemRequest != null)
8630 { 8649 {
8631 handlerMapItemRequest(this,mirpk.AgentData.Flags, mirpk.AgentData.EstateID, 8650 handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
8632 mirpk.AgentData.Godlike,mirpk.RequestData.ItemType, 8651 mirpk.AgentData.Godlike, mirpk.RequestData.ItemType,
8633 mirpk.RequestData.RegionHandle); 8652 mirpk.RequestData.RegionHandle);
8634 8653
8635 } 8654 }
@@ -9037,7 +9056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9037 groupMembersRequestPacket.GroupData.RequestID; 9056 groupMembersRequestPacket.GroupData.RequestID;
9038 groupMembersReply.GroupData.MemberCount = memberCount; 9057 groupMembersReply.GroupData.MemberCount = memberCount;
9039 9058
9040 for (int i = 0 ; i < blockCount ; i++) 9059 for (int i = 0; i < blockCount; i++)
9041 { 9060 {
9042 GroupMembersData m = members[0]; 9061 GroupMembersData m = members[0];
9043 members.RemoveAt(0); 9062 members.RemoveAt(0);
@@ -9174,7 +9193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9174 groupRoleMembersReply.MemberData = 9193 groupRoleMembersReply.MemberData =
9175 new GroupRoleMembersReplyPacket.MemberDataBlock[pairs]; 9194 new GroupRoleMembersReplyPacket.MemberDataBlock[pairs];
9176 9195
9177 for (int i = 0 ; i < pairs ; i++) 9196 for (int i = 0; i < pairs; i++)
9178 { 9197 {
9179 GroupRoleMembersData d = mappings[0]; 9198 GroupRoleMembersData d = mappings[0];
9180 mappings.RemoveAt(0); 9199 mappings.RemoveAt(0);
@@ -9301,7 +9320,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9301 ParcelDeedToGroup handlerParcelDeedToGroup = OnParcelDeedToGroup; 9320 ParcelDeedToGroup handlerParcelDeedToGroup = OnParcelDeedToGroup;
9302 if (handlerParcelDeedToGroup != null) 9321 if (handlerParcelDeedToGroup != null)
9303 { 9322 {
9304 handlerParcelDeedToGroup(parcelDeedToGroup.Data.LocalID, parcelDeedToGroup.Data.GroupID,this); 9323 handlerParcelDeedToGroup(parcelDeedToGroup.Data.LocalID, parcelDeedToGroup.Data.GroupID, this);
9305 9324
9306 } 9325 }
9307 } 9326 }
@@ -9759,7 +9778,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9759 9778
9760 PickDelete handlerPickDelete = OnPickDelete; 9779 PickDelete handlerPickDelete = OnPickDelete;
9761 if (handlerPickDelete != null) 9780 if (handlerPickDelete != null)
9762 handlerPickDelete(this, pickDelete.Data.PickID); 9781 handlerPickDelete(this, pickDelete.Data.PickID);
9763 break; 9782 break;
9764 case PacketType.PickGodDelete: 9783 case PacketType.PickGodDelete:
9765 PickGodDeletePacket pickGodDelete = 9784 PickGodDeletePacket pickGodDelete =
@@ -9779,7 +9798,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9779 handlerPickGodDelete(this, 9798 handlerPickGodDelete(this,
9780 pickGodDelete.AgentData.AgentID, 9799 pickGodDelete.AgentData.AgentID,
9781 pickGodDelete.Data.PickID, 9800 pickGodDelete.Data.PickID,
9782 pickGodDelete.Data.QueryID); 9801 pickGodDelete.Data.QueryID);
9783 break; 9802 break;
9784 case PacketType.PickInfoUpdate: 9803 case PacketType.PickInfoUpdate:
9785 PickInfoUpdatePacket pickInfoUpdate = 9804 PickInfoUpdatePacket pickInfoUpdate =
@@ -9870,7 +9889,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9870 m_log.Warn("[CLIENT]: unhandled packet " + Pack); 9889 m_log.Warn("[CLIENT]: unhandled packet " + Pack);
9871 break; 9890 break;
9872 9891
9873 #endregion 9892 #endregion
9874 } 9893 }
9875 9894
9876 PacketPool.Instance.ReturnPacket(Pack); 9895 PacketPool.Instance.ReturnPacket(Pack);
@@ -9907,7 +9926,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9907 //shape.Textures = ntex; 9926 //shape.Textures = ntex;
9908 return shape; 9927 return shape;
9909 } 9928 }
9910 9929
9911 public ClientInfo GetClientInfo() 9930 public ClientInfo GetClientInfo()
9912 { 9931 {
9913 ClientInfo info = m_udpClient.GetClientInfo(); 9932 ClientInfo info = m_udpClient.GetClientInfo();
@@ -9935,7 +9954,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9935 { 9954 {
9936 ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket(); 9955 ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
9937 commandMessagePacket.CommandBlock.Flags = flags; 9956 commandMessagePacket.CommandBlock.Flags = flags;
9938 commandMessagePacket.CommandBlock.Command =(uint) command; 9957 commandMessagePacket.CommandBlock.Command = (uint)command;
9939 commandMessagePacket.CommandBlock.Time = time; 9958 commandMessagePacket.CommandBlock.Time = time;
9940 9959
9941 OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown); 9960 OutPacket(commandMessagePacket, ThrottleOutPacketType.Unknown);
@@ -9963,7 +9982,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9963 9982
9964 #region Camera 9983 #region Camera
9965 9984
9966 public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters) 9985 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
9967 { 9986 {
9968 SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties); 9987 SetFollowCamPropertiesPacket packet = (SetFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.SetFollowCamProperties);
9969 packet.ObjectData.ObjectID = objectID; 9988 packet.ObjectData.ObjectID = objectID;
@@ -9981,7 +10000,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9981 OutPacket(packet, ThrottleOutPacketType.Task); 10000 OutPacket(packet, ThrottleOutPacketType.Task);
9982 } 10001 }
9983 10002
9984 public void SendClearFollowCamProperties (UUID objectID) 10003 public void SendClearFollowCamProperties(UUID objectID)
9985 { 10004 {
9986 ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties); 10005 ClearFollowCamPropertiesPacket packet = (ClearFollowCamPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ClearFollowCamProperties);
9987 packet.ObjectData.ObjectID = objectID; 10006 packet.ObjectData.ObjectID = objectID;
@@ -10083,8 +10102,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10083 { 10102 {
10084 return m_udpClient.GetStats(); 10103 return m_udpClient.GetStats();
10085 } 10104 }
10086 10105
10087 public string XReport(string uptime, string version) 10106 public string XReport(string uptime, string version)
10088 { 10107 {
10089 return String.Empty; 10108 return String.Empty;
10090 } 10109 }
@@ -10158,7 +10177,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10158 } 10177 }
10159 10178
10160 //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID); 10179 //m_log.DebugFormat("[ASSET CACHE]: Asset transfer request for asset which is {0} already known to be missing. Dropping", requestID);
10161 10180
10162 // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right. 10181 // FIXME: We never tell the client about assets which do not exist when requested by this transfer mechanism, which can't be right.
10163 return; 10182 return;
10164 } 10183 }
@@ -10381,7 +10400,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10381 #endregion 10400 #endregion
10382 10401
10383 #region LookupItem 10402 #region LookupItem
10384 private struct LookupItem { 10403 private struct LookupItem
10404 {
10385 internal MinHeap<MinHeapItem> Heap; 10405 internal MinHeap<MinHeapItem> Heap;
10386 internal IHandle Handle; 10406 internal IHandle Handle;
10387 } 10407 }