aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs378
1 files changed, 205 insertions, 173 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index f29d2f9..b232ed6 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -38,6 +38,7 @@ using libsecondlife.Packets;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Communications.Cache; 39using OpenSim.Framework.Communications.Cache;
40using OpenSim.Framework.Console; 40using OpenSim.Framework.Console;
41using OpenSim.Region.Environment.Scenes;
41using Timer=System.Timers.Timer; 42using Timer=System.Timers.Timer;
42 43
43namespace OpenSim.Region.ClientStack 44namespace OpenSim.Region.ClientStack
@@ -71,9 +72,10 @@ namespace OpenSim.Region.ClientStack
71 private readonly uint m_circuitCode; 72 private readonly uint m_circuitCode;
72 private int m_moneyBalance; 73 private int m_moneyBalance;
73 74
74 private readonly byte[] m_channelVersion=new byte[] { 0x00} ; // Dummy value needed by libSL 75 private readonly byte[] m_channelVersion = new byte[] {0x00}; // Dummy value needed by libSL
75 76
76 /* protected variables */ 77 /* protected variables */
78
77 protected static Dictionary<PacketType, PacketMethod> PacketHandlers = 79 protected static Dictionary<PacketType, PacketMethod> PacketHandlers =
78 new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients 80 new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
79 81
@@ -94,7 +96,7 @@ namespace OpenSim.Region.ClientStack
94 protected const int RESEND_TIMEOUT = 4000; 96 protected const int RESEND_TIMEOUT = 4000;
95 protected const int MAX_SEQUENCE = 0xFFFFFF; 97 protected const int MAX_SEQUENCE = 0xFFFFFF;
96 protected PacketServer m_networkServer; 98 protected PacketServer m_networkServer;
97 99
98 /* public variables */ 100 /* public variables */
99 protected string m_firstName; 101 protected string m_firstName;
100 protected string m_lastName; 102 protected string m_lastName;
@@ -103,11 +105,12 @@ namespace OpenSim.Region.ClientStack
103 protected EndPoint m_userEndPoint; 105 protected EndPoint m_userEndPoint;
104 106
105 /* Properties */ 107 /* Properties */
108
106 public LLUUID SecureSessionId 109 public LLUUID SecureSessionId
107 { 110 {
108 get { return m_secureSessionId; } 111 get { return m_secureSessionId; }
109 } 112 }
110 113
111 public IScene Scene 114 public IScene Scene
112 { 115 {
113 get { return m_scene; } 116 get { return m_scene; }
@@ -144,7 +147,7 @@ namespace OpenSim.Region.ClientStack
144 { 147 {
145 get { return m_lastName; } 148 get { return m_lastName; }
146 } 149 }
147 150
148 /// <summary> 151 /// <summary>
149 /// Full name of the client (first name and last name) 152 /// Full name of the client (first name and last name)
150 /// </summary> 153 /// </summary>
@@ -162,10 +165,11 @@ namespace OpenSim.Region.ClientStack
162 { 165 {
163 get { return m_moneyBalance; } 166 get { return m_moneyBalance; }
164 } 167 }
165 168
166 /* METHODS */ 169 /* METHODS */
167 170
168 public ClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, PacketServer packServer, AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode) 171 public ClientView(EndPoint remoteEP, IScene scene, AssetCache assetCache, PacketServer packServer,
172 AgentCircuitManager authenSessions, LLUUID agentId, LLUUID sessionId, uint circuitCode)
169 { 173 {
170 m_moneyBalance = 1000; 174 m_moneyBalance = 1000;
171 175
@@ -209,7 +213,6 @@ namespace OpenSim.Region.ClientStack
209 213
210 private void CloseCleanup() 214 private void CloseCleanup()
211 { 215 {
212
213 m_scene.RemoveClient(AgentId); 216 m_scene.RemoveClient(AgentId);
214 // Send the STOP packet 217 // Send the STOP packet
215 DisableSimulatorPacket disable = new DisableSimulatorPacket(); 218 DisableSimulatorPacket disable = new DisableSimulatorPacket();
@@ -222,9 +225,6 @@ namespace OpenSim.Region.ClientStack
222 225
223 Thread.Sleep(2000); 226 Thread.Sleep(2000);
224 227
225
226
227
228 228
229 // Shut down timers 229 // Shut down timers
230 m_ackTimer.Stop(); 230 m_ackTimer.Stop();
@@ -243,18 +243,15 @@ namespace OpenSim.Region.ClientStack
243 243
244 public void Close(bool ShutdownCircult) 244 public void Close(bool ShutdownCircult)
245 { 245 {
246
247 // Pull Client out of Region 246 // Pull Client out of Region
248 MainLog.Instance.Verbose("CLIENT", "Close has been called"); 247 MainLog.Instance.Verbose("CLIENT", "Close has been called");
249 248
250 //raiseevent on the packet server to Shutdown the circuit 249 //raiseevent on the packet server to Shutdown the circuit
251 if (ShutdownCircult) 250 if (ShutdownCircult)
252 OnConnectionClosed(this); 251 OnConnectionClosed(this);
253
254 252
255 CloseCleanup();
256 253
257 254 CloseCleanup();
258 } 255 }
259 256
260 public void Kick(string message) 257 public void Kick(string message)
@@ -262,8 +259,8 @@ namespace OpenSim.Region.ClientStack
262 KickUserPacket kupack = new KickUserPacket(); 259 KickUserPacket kupack = new KickUserPacket();
263 kupack.UserInfo.AgentID = AgentId; 260 kupack.UserInfo.AgentID = AgentId;
264 kupack.UserInfo.SessionID = SessionId; 261 kupack.UserInfo.SessionID = SessionId;
265 kupack.TargetBlock.TargetIP = (uint)0; 262 kupack.TargetBlock.TargetIP = (uint) 0;
266 kupack.TargetBlock.TargetPort = (ushort)0; 263 kupack.TargetBlock.TargetPort = (ushort) 0;
267 kupack.UserInfo.Reason = Helpers.StringToField(message); 264 kupack.UserInfo.Reason = Helpers.StringToField(message);
268 OutPacket(kupack, ThrottleOutPacketType.Task); 265 OutPacket(kupack, ThrottleOutPacketType.Task);
269 } 266 }
@@ -340,9 +337,9 @@ namespace OpenSim.Region.ClientStack
340 if (m_debug < 254 && packet.Type == PacketType.ViewerEffect) 337 if (m_debug < 254 && packet.Type == PacketType.ViewerEffect)
341 return; 338 return;
342 if (m_debug < 253 && ( 339 if (m_debug < 253 && (
343 packet.Type == PacketType.CompletePingCheck || 340 packet.Type == PacketType.CompletePingCheck ||
344 packet.Type == PacketType.StartPingCheck 341 packet.Type == PacketType.StartPingCheck
345 )) 342 ))
346 return; 343 return;
347 if (m_debug < 252 && packet.Type == PacketType.PacketAck) 344 if (m_debug < 252 && packet.Type == PacketType.PacketAck)
348 return; 345 return;
@@ -552,7 +549,7 @@ namespace OpenSim.Region.ClientStack
552 public event EstateOwnerMessageRequest OnEstateOwnerMessage; 549 public event EstateOwnerMessageRequest OnEstateOwnerMessage;
553 public event RegionInfoRequest OnRegionInfoRequest; 550 public event RegionInfoRequest OnRegionInfoRequest;
554 public event EstateCovenantRequest OnEstateCovenantRequest; 551 public event EstateCovenantRequest OnEstateCovenantRequest;
555 552
556 #region Scene/Avatar to Client 553 #region Scene/Avatar to Client
557 554
558 /// <summary> 555 /// <summary>
@@ -561,7 +558,8 @@ namespace OpenSim.Region.ClientStack
561 /// <param name="regionInfo"></param> 558 /// <param name="regionInfo"></param>
562 public void SendRegionHandshake(RegionInfo regionInfo) 559 public void SendRegionHandshake(RegionInfo regionInfo)
563 { 560 {
564 RegionHandshakePacket handshake = (RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake); 561 RegionHandshakePacket handshake =
562 (RegionHandshakePacket) PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
565 563
566 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor; 564 handshake.RegionInfo.BillableFactor = regionInfo.EstateSettings.billableFactor;
567 handshake.RegionInfo.IsEstateManager = false; 565 handshake.RegionInfo.IsEstateManager = false;
@@ -645,7 +643,7 @@ namespace OpenSim.Region.ClientStack
645 643
646 OutPacket(reply, ThrottleOutPacketType.Task); 644 OutPacket(reply, ThrottleOutPacketType.Task);
647 } 645 }
648 646
649 /// <summary> 647 /// <summary>
650 /// 648 ///
651 /// </summary> 649 /// </summary>
@@ -861,7 +859,7 @@ namespace OpenSim.Region.ClientStack
861 public void SendTeleportFailed() 859 public void SendTeleportFailed()
862 { 860 {
863 TeleportFailedPacket tpFailed = new TeleportFailedPacket(); 861 TeleportFailedPacket tpFailed = new TeleportFailedPacket();
864 tpFailed.Info.AgentID = this.AgentId; 862 tpFailed.Info.AgentID = AgentId;
865 tpFailed.Info.Reason = Helpers.StringToField("unknown failure of teleport"); 863 tpFailed.Info.Reason = Helpers.StringToField("unknown failure of teleport");
866 OutPacket(tpFailed, ThrottleOutPacketType.Task); 864 OutPacket(tpFailed, ThrottleOutPacketType.Task);
867 } 865 }
@@ -914,8 +912,8 @@ namespace OpenSim.Region.ClientStack
914 /// <param name="items">The items contained in the folder identified by folderID</param> 912 /// <param name="items">The items contained in the folder identified by folderID</param>
915 /// <param name="fetchFolders">Do we need to send folder information?</param> 913 /// <param name="fetchFolders">Do we need to send folder information?</param>
916 /// <param name="fetchItems">Do we need to send item information?</param> 914 /// <param name="fetchItems">Do we need to send item information?</param>
917 public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, 915 public void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
918 List<InventoryFolderBase> folders, 916 List<InventoryFolderBase> folders,
919 bool fetchFolders, bool fetchItems) 917 bool fetchFolders, bool fetchItems)
920 { 918 {
921 // An inventory descendents packet consists of a single agent section and an inventory details 919 // An inventory descendents packet consists of a single agent section and an inventory details
@@ -929,14 +927,14 @@ namespace OpenSim.Region.ClientStack
929 // for one example of this kind of thing. So we'll go for a cautious max 927 // for one example of this kind of thing. So we'll go for a cautious max
930 // items of 20 which gives a packet size of about 11k 928 // items of 20 which gives a packet size of about 11k
931 int MAX_ITEMS_PER_PACKET = 20; 929 int MAX_ITEMS_PER_PACKET = 20;
932 930
933 Encoding enc = Encoding.ASCII; 931 Encoding enc = Encoding.ASCII;
934 uint FULL_MASK_PERMISSIONS = 2147483647; 932 uint FULL_MASK_PERMISSIONS = 2147483647;
935 933
936 if (fetchItems) 934 if (fetchItems)
937 { 935 {
938 InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); 936 InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID);
939 937
940 if (items.Count < MAX_ITEMS_PER_PACKET) 938 if (items.Count < MAX_ITEMS_PER_PACKET)
941 { 939 {
942 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count]; 940 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[items.Count];
@@ -947,7 +945,7 @@ namespace OpenSim.Region.ClientStack
947 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[MAX_ITEMS_PER_PACKET]; 945 descend.ItemData = new InventoryDescendentsPacket.ItemDataBlock[MAX_ITEMS_PER_PACKET];
948 descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET; 946 descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET;
949 } 947 }
950 948
951 // Even if we aren't fetching the folders, we still need to include the folder count 949 // Even if we aren't fetching the folders, we still need to include the folder count
952 // in the total number of descendents. Failure to do so will cause subtle bugs such 950 // in the total number of descendents. Failure to do so will cause subtle bugs such
953 // as the failure of textures which haven't been expanded in inventory to show up 951 // as the failure of textures which haven't been expanded in inventory to show up
@@ -956,7 +954,7 @@ namespace OpenSim.Region.ClientStack
956 { 954 {
957 descend.AgentData.Descendents += folders.Count; 955 descend.AgentData.Descendents += folders.Count;
958 } 956 }
959 957
960 int count = 0; 958 int count = 0;
961 int i = 0; 959 int i = 0;
962 foreach (InventoryItemBase item in items) 960 foreach (InventoryItemBase item in items)
@@ -973,28 +971,31 @@ namespace OpenSim.Region.ClientStack
973 descend.ItemData[i].FolderID = item.parentFolderID; 971 descend.ItemData[i].FolderID = item.parentFolderID;
974 descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); 972 descend.ItemData[i].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
975 descend.ItemData[i].GroupMask = 0; 973 descend.ItemData[i].GroupMask = 0;
976 descend.ItemData[i].InvType = (sbyte)item.invType; 974 descend.ItemData[i].InvType = (sbyte) item.invType;
977 descend.ItemData[i].Name = Helpers.StringToField(item.inventoryName); 975 descend.ItemData[i].Name = Helpers.StringToField(item.inventoryName);
978 descend.ItemData[i].NextOwnerMask = item.inventoryNextPermissions; 976 descend.ItemData[i].NextOwnerMask = item.inventoryNextPermissions;
979 descend.ItemData[i].OwnerID = item.avatarID; 977 descend.ItemData[i].OwnerID = item.avatarID;
980 descend.ItemData[i].OwnerMask = item.inventoryCurrentPermissions; 978 descend.ItemData[i].OwnerMask = item.inventoryCurrentPermissions;
981 descend.ItemData[i].SalePrice = 0; 979 descend.ItemData[i].SalePrice = 0;
982 descend.ItemData[i].SaleType = 0; 980 descend.ItemData[i].SaleType = 0;
983 descend.ItemData[i].Type = (sbyte)item.assetType; 981 descend.ItemData[i].Type = (sbyte) item.assetType;
984 descend.ItemData[i].CRC = 982 descend.ItemData[i].CRC =
985 Helpers.InventoryCRC(descend.ItemData[i].CreationDate, descend.ItemData[i].SaleType, 983 Helpers.InventoryCRC(descend.ItemData[i].CreationDate, descend.ItemData[i].SaleType,
986 descend.ItemData[i].InvType, descend.ItemData[i].Type, 984 descend.ItemData[i].InvType, descend.ItemData[i].Type,
987 descend.ItemData[i].AssetID, descend.ItemData[i].GroupID, descend.ItemData[i].SalePrice, 985 descend.ItemData[i].AssetID, descend.ItemData[i].GroupID,
986 descend.ItemData[i].SalePrice,
988 descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID, 987 descend.ItemData[i].OwnerID, descend.ItemData[i].CreatorID,
989 descend.ItemData[i].ItemID, descend.ItemData[i].FolderID, descend.ItemData[i].EveryoneMask, 988 descend.ItemData[i].ItemID, descend.ItemData[i].FolderID,
990 descend.ItemData[i].Flags, descend.ItemData[i].OwnerMask, descend.ItemData[i].GroupMask, item.inventoryCurrentPermissions); 989 descend.ItemData[i].EveryoneMask,
991 990 descend.ItemData[i].Flags, descend.ItemData[i].OwnerMask,
991 descend.ItemData[i].GroupMask, item.inventoryCurrentPermissions);
992
992 i++; 993 i++;
993 count++; 994 count++;
994 if (i == MAX_ITEMS_PER_PACKET) 995 if (i == MAX_ITEMS_PER_PACKET)
995 { 996 {
996 OutPacket(descend, ThrottleOutPacketType.Asset); 997 OutPacket(descend, ThrottleOutPacketType.Asset);
997 998
998 if ((items.Count - count) > 0) 999 if ((items.Count - count) > 0)
999 { 1000 {
1000 descend = CreateInventoryDescendentsPacket(ownerID, folderID); 1001 descend = CreateInventoryDescendentsPacket(ownerID, folderID);
@@ -1012,7 +1013,7 @@ namespace OpenSim.Region.ClientStack
1012 } 1013 }
1013 } 1014 }
1014 } 1015 }
1015 1016
1016 if (i < MAX_ITEMS_PER_PACKET) 1017 if (i < MAX_ITEMS_PER_PACKET)
1017 { 1018 {
1018 OutPacket(descend, ThrottleOutPacketType.Asset); 1019 OutPacket(descend, ThrottleOutPacketType.Asset);
@@ -1023,7 +1024,7 @@ namespace OpenSim.Region.ClientStack
1023 if (fetchFolders) 1024 if (fetchFolders)
1024 { 1025 {
1025 InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID); 1026 InventoryDescendentsPacket descend = CreateInventoryDescendentsPacket(ownerID, folderID);
1026 1027
1027 if (folders.Count < MAX_ITEMS_PER_PACKET) 1028 if (folders.Count < MAX_ITEMS_PER_PACKET)
1028 { 1029 {
1029 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count]; 1030 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count];
@@ -1034,14 +1035,14 @@ namespace OpenSim.Region.ClientStack
1034 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET]; 1035 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET];
1035 descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET; 1036 descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET;
1036 } 1037 }
1037 1038
1038 // Not sure if this scenario ever actually occurs, but nonetheless we include the items 1039 // Not sure if this scenario ever actually occurs, but nonetheless we include the items
1039 // count even if we're not sending item data for the same reasons as above. 1040 // count even if we're not sending item data for the same reasons as above.
1040 if (!fetchItems) 1041 if (!fetchItems)
1041 { 1042 {
1042 descend.AgentData.Descendents += items.Count; 1043 descend.AgentData.Descendents += items.Count;
1043 } 1044 }
1044 1045
1045 int i = 0; 1046 int i = 0;
1046 int count = 0; 1047 int count = 0;
1047 foreach (InventoryFolderBase folder in folders) 1048 foreach (InventoryFolderBase folder in folders)
@@ -1050,32 +1051,34 @@ namespace OpenSim.Region.ClientStack
1050 descend.FolderData[i].FolderID = folder.folderID; 1051 descend.FolderData[i].FolderID = folder.folderID;
1051 descend.FolderData[i].Name = Helpers.StringToField(folder.name); 1052 descend.FolderData[i].Name = Helpers.StringToField(folder.name);
1052 descend.FolderData[i].ParentID = folder.parentID; 1053 descend.FolderData[i].ParentID = folder.parentID;
1053 descend.FolderData[i].Type = (sbyte)folder.type; 1054 descend.FolderData[i].Type = (sbyte) folder.type;
1054 1055
1055 i++; 1056 i++;
1056 count++; 1057 count++;
1057 if (i == MAX_ITEMS_PER_PACKET) 1058 if (i == MAX_ITEMS_PER_PACKET)
1058 { 1059 {
1059 OutPacket(descend, ThrottleOutPacketType.Asset); 1060 OutPacket(descend, ThrottleOutPacketType.Asset);
1060 1061
1061 if ((folders.Count - count) > 0) 1062 if ((folders.Count - count) > 0)
1062 { 1063 {
1063 descend = CreateInventoryDescendentsPacket(ownerID, folderID); 1064 descend = CreateInventoryDescendentsPacket(ownerID, folderID);
1064 if ((folders.Count - count) < MAX_ITEMS_PER_PACKET) 1065 if ((folders.Count - count) < MAX_ITEMS_PER_PACKET)
1065 { 1066 {
1066 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[folders.Count - count]; 1067 descend.FolderData =
1068 new InventoryDescendentsPacket.FolderDataBlock[folders.Count - count];
1067 descend.AgentData.Descendents = folders.Count - count; 1069 descend.AgentData.Descendents = folders.Count - count;
1068 } 1070 }
1069 else 1071 else
1070 { 1072 {
1071 descend.FolderData = new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET]; 1073 descend.FolderData =
1074 new InventoryDescendentsPacket.FolderDataBlock[MAX_ITEMS_PER_PACKET];
1072 descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET; 1075 descend.AgentData.Descendents = MAX_ITEMS_PER_PACKET;
1073 } 1076 }
1074 i = 0; 1077 i = 0;
1075 } 1078 }
1076 } 1079 }
1077 } 1080 }
1078 1081
1079 if (i < MAX_ITEMS_PER_PACKET) 1082 if (i < MAX_ITEMS_PER_PACKET)
1080 { 1083 {
1081 OutPacket(descend, ThrottleOutPacketType.Asset); 1084 OutPacket(descend, ThrottleOutPacketType.Asset);
@@ -1204,6 +1207,7 @@ namespace OpenSim.Region.ClientStack
1204 sendXfer.DataPacket.Data = data; 1207 sendXfer.DataPacket.Data = data;
1205 OutPacket(sendXfer, ThrottleOutPacketType.Task); 1208 OutPacket(sendXfer, ThrottleOutPacketType.Task);
1206 } 1209 }
1210
1207 public void SendAvatarPickerReply(AvatarPickerReplyPacket replyPacket) 1211 public void SendAvatarPickerReply(AvatarPickerReplyPacket replyPacket)
1208 { 1212 {
1209 OutPacket(replyPacket, ThrottleOutPacketType.Task); 1213 OutPacket(replyPacket, ThrottleOutPacketType.Task);
@@ -1272,7 +1276,7 @@ namespace OpenSim.Region.ClientStack
1272 OutPacket(sound, ThrottleOutPacketType.Task); 1276 OutPacket(sound, ThrottleOutPacketType.Task);
1273 } 1277 }
1274 1278
1275 public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel) 1279 public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel)
1276 { 1280 {
1277 SimulatorViewerTimeMessagePacket viewertime = new SimulatorViewerTimeMessagePacket(); 1281 SimulatorViewerTimeMessagePacket viewertime = new SimulatorViewerTimeMessagePacket();
1278 viewertime.TimeInfo.SunDirection = sunPos; 1282 viewertime.TimeInfo.SunDirection = sunPos;
@@ -1524,12 +1528,13 @@ namespace OpenSim.Region.ClientStack
1524 1528
1525 OutPacket(attach, ThrottleOutPacketType.Task); 1529 OutPacket(attach, ThrottleOutPacketType.Task);
1526 } 1530 }
1527 1531
1528 1532
1529 public void SendPrimitiveToClient( 1533 public void SendPrimitiveToClient(
1530 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos, 1534 ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, LLVector3 pos,
1531 uint flags, 1535 uint flags,
1532 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction) 1536 LLUUID objectID, LLUUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem,
1537 LLQuaternion rotation, byte clickAction)
1533 { 1538 {
1534 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 1539 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
1535 outPacket.RegionData.RegionHandle = regionHandle; 1540 outPacket.RegionData.RegionHandle = regionHandle;
@@ -1572,8 +1577,8 @@ namespace OpenSim.Region.ClientStack
1572 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 1577 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
1573 LLQuaternion rotation) 1578 LLQuaternion rotation)
1574 { 1579 {
1575 LLVector3 velocity = new LLVector3(0f,0f,0f); 1580 LLVector3 velocity = new LLVector3(0f, 0f, 0f);
1576 LLVector3 rotationalvelocity = new LLVector3(0f,0f,0f); 1581 LLVector3 rotationalvelocity = new LLVector3(0f, 0f, 0f);
1577 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); 1582 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
1578 terse.RegionData.RegionHandle = regionHandle; 1583 terse.RegionData.RegionHandle = regionHandle;
1579 terse.RegionData.TimeDilation = timeDilation; 1584 terse.RegionData.TimeDilation = timeDilation;
@@ -1582,10 +1587,10 @@ namespace OpenSim.Region.ClientStack
1582 1587
1583 OutPacket(terse, ThrottleOutPacketType.Task); 1588 OutPacket(terse, ThrottleOutPacketType.Task);
1584 } 1589 }
1590
1585 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 1591 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
1586 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity) 1592 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity)
1587 { 1593 {
1588
1589 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket(); 1594 ImprovedTerseObjectUpdatePacket terse = new ImprovedTerseObjectUpdatePacket();
1590 terse.RegionData.RegionHandle = regionHandle; 1595 terse.RegionData.RegionHandle = regionHandle;
1591 terse.RegionData.TimeDilation = timeDilation; 1596 terse.RegionData.TimeDilation = timeDilation;
@@ -1594,7 +1599,6 @@ namespace OpenSim.Region.ClientStack
1594 1599
1595 OutPacket(terse, ThrottleOutPacketType.Task); 1600 OutPacket(terse, ThrottleOutPacketType.Task);
1596 } 1601 }
1597
1598 1602
1599 #endregion 1603 #endregion
1600 1604
@@ -1696,7 +1700,9 @@ namespace OpenSim.Region.ClientStack
1696 /// <returns></returns> 1700 /// <returns></returns>
1697 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID, 1701 protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreatePrimImprovedBlock(uint localID,
1698 LLVector3 position, 1702 LLVector3 position,
1699 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity) 1703 LLQuaternion rotation,
1704 LLVector3 velocity,
1705 LLVector3 rotationalvelocity)
1700 { 1706 {
1701 uint ID = localID; 1707 uint ID = localID;
1702 byte[] bytes = new byte[60]; 1708 byte[] bytes = new byte[60];
@@ -1724,16 +1730,16 @@ namespace OpenSim.Region.ClientStack
1724 vel.y += 1; 1730 vel.y += 1;
1725 vel.z += 1; 1731 vel.z += 1;
1726 //vel 1732 //vel
1727 velx = (ushort)(32768 * (vel.x)); 1733 velx = (ushort) (32768*(vel.x));
1728 vely = (ushort)(32768 * (vel.y)); 1734 vely = (ushort) (32768*(vel.y));
1729 velz = (ushort)(32768 * (vel.z)); 1735 velz = (ushort) (32768*(vel.z));
1730 1736
1731 bytes[i++] = (byte) (velx % 256); 1737 bytes[i++] = (byte) (velx%256);
1732 bytes[i++] = (byte) ((velx >> 8) % 256); 1738 bytes[i++] = (byte) ((velx >> 8)%256);
1733 bytes[i++] = (byte) (vely % 256); 1739 bytes[i++] = (byte) (vely%256);
1734 bytes[i++] = (byte) ((vely >> 8) % 256); 1740 bytes[i++] = (byte) ((vely >> 8)%256);
1735 bytes[i++] = (byte) (velz % 256); 1741 bytes[i++] = (byte) (velz%256);
1736 bytes[i++] = (byte) ((velz >> 8) % 256); 1742 bytes[i++] = (byte) ((velz >> 8)%256);
1737 1743
1738 //accel 1744 //accel
1739 bytes[i++] = (byte) (ac%256); 1745 bytes[i++] = (byte) (ac%256);
@@ -1763,21 +1769,21 @@ namespace OpenSim.Region.ClientStack
1763 ushort rvelx, rvely, rvelz; 1769 ushort rvelx, rvely, rvelz;
1764 Vector3 rvel = new Vector3(rotationalvelocity.X, rotationalvelocity.Y, rotationalvelocity.Z); 1770 Vector3 rvel = new Vector3(rotationalvelocity.X, rotationalvelocity.Y, rotationalvelocity.Z);
1765 1771
1766 rvel = rvel / 128.0f; 1772 rvel = rvel/128.0f;
1767 rvel.x += 1; 1773 rvel.x += 1;
1768 rvel.y += 1; 1774 rvel.y += 1;
1769 rvel.z += 1; 1775 rvel.z += 1;
1770 //vel 1776 //vel
1771 rvelx = (ushort)(32768 * (rvel.x)); 1777 rvelx = (ushort) (32768*(rvel.x));
1772 rvely = (ushort)(32768 * (rvel.y)); 1778 rvely = (ushort) (32768*(rvel.y));
1773 rvelz = (ushort)(32768 * (rvel.z)); 1779 rvelz = (ushort) (32768*(rvel.z));
1774 1780
1775 bytes[i++] = (byte)(rvelx % 256); 1781 bytes[i++] = (byte) (rvelx%256);
1776 bytes[i++] = (byte)((rvelx >> 8) % 256); 1782 bytes[i++] = (byte) ((rvelx >> 8)%256);
1777 bytes[i++] = (byte)(rvely % 256); 1783 bytes[i++] = (byte) (rvely%256);
1778 bytes[i++] = (byte)((rvely >> 8) % 256); 1784 bytes[i++] = (byte) ((rvely >> 8)%256);
1779 bytes[i++] = (byte)(rvelz % 256); 1785 bytes[i++] = (byte) (rvelz%256);
1780 bytes[i++] = (byte)((rvelz >> 8) % 256); 1786 bytes[i++] = (byte) ((rvelz >> 8)%256);
1781 1787
1782 dat.Data = bytes; 1788 dat.Data = bytes;
1783 return dat; 1789 return dat;
@@ -1906,7 +1912,7 @@ namespace OpenSim.Region.ClientStack
1906 objdata.Sound = LLUUID.Zero; 1912 objdata.Sound = LLUUID.Zero;
1907 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005")); 1913 LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-5005-000000000005"));
1908 objdata.TextureEntry = ntex.ToBytes(); 1914 objdata.TextureEntry = ntex.ToBytes();
1909 1915
1910 objdata.State = 0; 1916 objdata.State = 0;
1911 objdata.Data = new byte[0]; 1917 objdata.Data = new byte[0];
1912 1918
@@ -1993,13 +1999,13 @@ namespace OpenSim.Region.ClientStack
1993 { 1999 {
1994 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket) packet; 2000 MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket) packet;
1995 // System.Console.WriteLine("new multi update packet " + multipleupdate.ToString()); 2001 // System.Console.WriteLine("new multi update packet " + multipleupdate.ToString());
1996 OpenSim.Region.Environment.Scenes.Scene tScene = (OpenSim.Region.Environment.Scenes.Scene)this.m_scene; 2002 Scene tScene = (Scene) m_scene;
1997 2003
1998 for (int i = 0; i < multipleupdate.ObjectData.Length; i++) 2004 for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
1999 { 2005 {
2000 // Can't act on Null Data 2006 // Can't act on Null Data
2001 if (multipleupdate.ObjectData[i].Data != null) 2007 if (multipleupdate.ObjectData[i].Data != null)
2002 { 2008 {
2003 LLUUID editobj = tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID; 2009 LLUUID editobj = tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID;
2004 if (editobj != null) 2010 if (editobj != null)
2005 { 2011 {
@@ -2024,8 +2030,8 @@ namespace OpenSim.Region.ClientStack
2024 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); 2030 OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
2025 } 2031 }
2026 } 2032 }
2027 #endregion position 2033 #endregion position
2028 #region rotation 2034 #region rotation
2029 2035
2030 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab 2036 else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab
2031 { 2037 {
@@ -2062,11 +2068,12 @@ namespace OpenSim.Region.ClientStack
2062 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); 2068 LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
2063 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); 2069 //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
2064 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); 2070 // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
2065 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); 2071 OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot,
2072 this);
2066 } 2073 }
2067 } 2074 }
2068 #endregion 2075 #endregion
2069 #region scale 2076 #region scale
2070 2077
2071 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab 2078 else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab
2072 { 2079 {
@@ -2118,9 +2125,9 @@ namespace OpenSim.Region.ClientStack
2118 else 2125 else
2119 { 2126 {
2120 // It's a ghost! tell the client to delete it from view. 2127 // It's a ghost! tell the client to delete it from view.
2121 simClient.SendKillObject(this.Scene.RegionInfo.RegionHandle, multipleupdate.ObjectData[i].ObjectLocalID); 2128 simClient.SendKillObject(Scene.RegionInfo.RegionHandle,
2129 multipleupdate.ObjectData[i].ObjectLocalID);
2122 } 2130 }
2123
2124 } 2131 }
2125 } 2132 }
2126 return true; 2133 return true;
@@ -2173,10 +2180,12 @@ namespace OpenSim.Region.ClientStack
2173 this.OutPacket(mbReply, ThrottleOutPacketType.Land); 2180 this.OutPacket(mbReply, ThrottleOutPacketType.Land);
2174 */ 2181 */
2175 } 2182 }
2183
2176 public void SetChildAgentThrottle(byte[] throttles) 2184 public void SetChildAgentThrottle(byte[] throttles)
2177 { 2185 {
2178 m_packetQueue.SetThrottleFromClient(throttles); 2186 m_packetQueue.SetThrottleFromClient(throttles);
2179 } 2187 }
2188
2180 // Previously ClientView.m_packetQueue 2189 // Previously ClientView.m_packetQueue
2181 2190
2182 // A thread safe sequence number allocator. 2191 // A thread safe sequence number allocator.
@@ -2198,7 +2207,7 @@ namespace OpenSim.Region.ClientStack
2198 } 2207 }
2199 return seq; 2208 return seq;
2200 } 2209 }
2201 2210
2202 protected void AddAck(Packet Pack) 2211 protected void AddAck(Packet Pack)
2203 { 2212 {
2204 lock (m_needAck) 2213 lock (m_needAck)
@@ -2236,13 +2245,13 @@ namespace OpenSim.Region.ClientStack
2236 { 2245 {
2237 Pack.Header.AckList = new uint[m_pendingAcks.Count]; 2246 Pack.Header.AckList = new uint[m_pendingAcks.Count];
2238 int i = 0; 2247 int i = 0;
2239 2248
2240 foreach (uint ack in m_pendingAcks.Values) 2249 foreach (uint ack in m_pendingAcks.Values)
2241 { 2250 {
2242 Pack.Header.AckList[i] = ack; 2251 Pack.Header.AckList[i] = ack;
2243 i++; 2252 i++;
2244 } 2253 }
2245 2254
2246 m_pendingAcks.Clear(); 2255 m_pendingAcks.Clear();
2247 Pack.Header.AppendedAcks = true; 2256 Pack.Header.AppendedAcks = true;
2248 } 2257 }
@@ -2272,22 +2281,22 @@ namespace OpenSim.Region.ClientStack
2272 // Actually make the byte array and send it 2281 // Actually make the byte array and send it
2273 try 2282 try
2274 { 2283 {
2275 byte[] sendbuffer = Pack.ToBytes(); 2284 byte[] sendbuffer = Pack.ToBytes();
2276 if (Pack is RegionHandshakePacket) 2285 if (Pack is RegionHandshakePacket)
2277 { 2286 {
2278 PacketPool.Instance.ReturnPacket(Pack); 2287 PacketPool.Instance.ReturnPacket(Pack);
2279 } 2288 }
2280 2289
2281 if (Pack.Header.Zerocoded) 2290 if (Pack.Header.Zerocoded)
2282 { 2291 {
2283 byte[] ZeroOutBuffer = new byte[4096]; 2292 byte[] ZeroOutBuffer = new byte[4096];
2284 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer); 2293 int packetsize = Helpers.ZeroEncode(sendbuffer, sendbuffer.Length, ZeroOutBuffer);
2285 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode); 2294 m_networkServer.SendPacketTo(ZeroOutBuffer, packetsize, SocketFlags.None, m_circuitCode);
2286 } 2295 }
2287 else 2296 else
2288 { 2297 {
2289 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode); 2298 m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
2290 } 2299 }
2291 } 2300 }
2292 catch (Exception e) 2301 catch (Exception e)
2293 { 2302 {
@@ -2298,7 +2307,7 @@ namespace OpenSim.Region.ClientStack
2298 Close(true); 2307 Close(true);
2299 } 2308 }
2300 } 2309 }
2301 2310
2302 public virtual void InPacket(Packet NewPack) 2311 public virtual void InPacket(Packet NewPack)
2303 { 2312 {
2304 // Handle appended ACKs 2313 // Handle appended ACKs
@@ -2314,7 +2323,7 @@ namespace OpenSim.Region.ClientStack
2314 } 2323 }
2315 } 2324 }
2316 } 2325 }
2317 2326
2318 2327
2319 // Handle PacketAck packets 2328 // Handle PacketAck packets
2320 if (NewPack.Type == PacketType.PacketAck) 2329 if (NewPack.Type == PacketType.PacketAck)
@@ -2353,7 +2362,7 @@ namespace OpenSim.Region.ClientStack
2353 item.Packet = NewPack; 2362 item.Packet = NewPack;
2354 item.Incoming = false; 2363 item.Incoming = false;
2355 item.throttleType = throttlePacketType; // Packet throttle type 2364 item.throttleType = throttlePacketType; // Packet throttle type
2356 m_packetQueue.Enqueue(item); 2365 m_packetQueue.Enqueue(item);
2357 } 2366 }
2358 2367
2359 # region Low Level Packet Methods 2368 # region Low Level Packet Methods
@@ -2392,7 +2401,7 @@ namespace OpenSim.Region.ClientStack
2392 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) 2401 if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent))
2393 { 2402 {
2394 MainLog.Instance.Verbose("NETWORK", "Resending " + packet.Type.ToString() + " packet, " + 2403 MainLog.Instance.Verbose("NETWORK", "Resending " + packet.Type.ToString() + " packet, " +
2395 (now - packet.TickCount) + "ms have passed"); 2404 (now - packet.TickCount) + "ms have passed");
2396 2405
2397 packet.Header.Resent = true; 2406 packet.Header.Resent = true;
2398 OutPacket(packet, ThrottleOutPacketType.Resend); 2407 OutPacket(packet, ThrottleOutPacketType.Resend);
@@ -2442,6 +2451,7 @@ namespace OpenSim.Region.ClientStack
2442 } 2451 }
2443 2452
2444 #endregion 2453 #endregion
2454
2445 // Previously ClientView.ProcessPackets 2455 // Previously ClientView.ProcessPackets
2446 2456
2447 public bool AddMoney(int debit) 2457 public bool AddMoney(int debit)
@@ -2539,12 +2549,13 @@ namespace OpenSim.Region.ClientStack
2539 { 2549 {
2540 if (OnModifyTerrain != null) 2550 if (OnModifyTerrain != null)
2541 { 2551 {
2542 for (int i=0; i < modify.ParcelData.Length; i++) 2552 for (int i = 0; i < modify.ParcelData.Length; i++)
2543 { 2553 {
2544 OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, 2554 OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds,
2545 modify.ModifyBlock.BrushSize, 2555 modify.ModifyBlock.BrushSize,
2546 modify.ModifyBlock.Action, modify.ParcelData[i].North, 2556 modify.ModifyBlock.Action, modify.ParcelData[i].North,
2547 modify.ParcelData[i].West, modify.ParcelData[i].South, modify.ParcelData[i].East, this); 2557 modify.ParcelData[i].West, modify.ParcelData[i].South,
2558 modify.ParcelData[i].East, this);
2548 } 2559 }
2549 } 2560 }
2550 } 2561 }
@@ -2558,7 +2569,7 @@ namespace OpenSim.Region.ClientStack
2558 case PacketType.AgentWearablesRequest: 2569 case PacketType.AgentWearablesRequest:
2559 if (OnRequestWearables != null) 2570 if (OnRequestWearables != null)
2560 { 2571 {
2561 OnRequestWearables( ); 2572 OnRequestWearables();
2562 } 2573 }
2563 if (OnRequestAvatarsData != null) 2574 if (OnRequestAvatarsData != null)
2564 { 2575 {
@@ -2575,21 +2586,23 @@ namespace OpenSim.Region.ClientStack
2575 case PacketType.AgentIsNowWearing: 2586 case PacketType.AgentIsNowWearing:
2576 if (OnAvatarNowWearing != null) 2587 if (OnAvatarNowWearing != null)
2577 { 2588 {
2578 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket)Pack; 2589 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket) Pack;
2579 AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); 2590 AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
2580 for (int i = 0; i < nowWearing.WearableData.Length; i++) 2591 for (int i = 0; i < nowWearing.WearableData.Length; i++)
2581 { 2592 {
2582 AvatarWearingArgs.Wearable wearable = new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, nowWearing.WearableData[i].WearableType); 2593 AvatarWearingArgs.Wearable wearable =
2594 new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID,
2595 nowWearing.WearableData[i].WearableType);
2583 wearingArgs.NowWearing.Add(wearable); 2596 wearingArgs.NowWearing.Add(wearable);
2584 } 2597 }
2585 OnAvatarNowWearing(this, wearingArgs); 2598 OnAvatarNowWearing(this, wearingArgs);
2586 } 2599 }
2587 break; 2600 break;
2588 case PacketType.SetAlwaysRun: 2601 case PacketType.SetAlwaysRun:
2589 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; 2602 SetAlwaysRunPacket run = (SetAlwaysRunPacket) Pack;
2590 2603
2591 if (OnSetAlwaysRun != null) 2604 if (OnSetAlwaysRun != null)
2592 OnSetAlwaysRun(this,run.AgentData.AlwaysRun); 2605 OnSetAlwaysRun(this, run.AgentData.AlwaysRun);
2593 2606
2594 break; 2607 break;
2595 case PacketType.CompleteAgentMovement: 2608 case PacketType.CompleteAgentMovement:
@@ -2603,7 +2616,8 @@ namespace OpenSim.Region.ClientStack
2603 { 2616 {
2604 AgentUpdatePacket agenUpdate = (AgentUpdatePacket) Pack; 2617 AgentUpdatePacket agenUpdate = (AgentUpdatePacket) Pack;
2605 2618
2606 OnAgentUpdate(this, agenUpdate); //agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotationa); 2619 OnAgentUpdate(this, agenUpdate);
2620 //agenUpdate.AgentData.ControlFlags, agenUpdate.AgentData.BodyRotationa);
2607 } 2621 }
2608 break; 2622 break;
2609 case PacketType.AgentAnimation: 2623 case PacketType.AgentAnimation:
@@ -2642,15 +2656,17 @@ namespace OpenSim.Region.ClientStack
2642 } 2656 }
2643 break; 2657 break;
2644 case PacketType.AvatarPickerRequest: 2658 case PacketType.AvatarPickerRequest:
2645 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; 2659 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket) Pack;
2646 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData; 2660 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData;
2647 AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data; 2661 AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data;
2648 //System.Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name)); 2662 //System.Console.WriteLine("Agent Sends:" + Helpers.FieldToUTF8String(querydata.Name));
2649 if (OnAvatarPickerRequest != null) 2663 if (OnAvatarPickerRequest != null)
2650 { 2664 {
2651 OnAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID, Helpers.FieldToUTF8String(querydata.Name)); 2665 OnAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID,
2666 Helpers.FieldToUTF8String(querydata.Name));
2652 } 2667 }
2653 break; 2668 break;
2669
2654 #endregion 2670 #endregion
2655 2671
2656 #region Objects/m_sceneObjects 2672 #region Objects/m_sceneObjects
@@ -2675,7 +2691,7 @@ namespace OpenSim.Region.ClientStack
2675 break; 2691 break;
2676 case PacketType.ObjectDelink: 2692 case PacketType.ObjectDelink:
2677 ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack; 2693 ObjectDelinkPacket delink = (ObjectDelinkPacket) Pack;
2678 2694
2679 // It appears the prim at index 0 is not always the root prim (for 2695 // It appears the prim at index 0 is not always the root prim (for
2680 // instance, when one prim of a link set has been edited independently 2696 // instance, when one prim of a link set has been edited independently
2681 // of the others). Therefore, we'll pass all the ids onto the delink 2697 // of the others). Therefore, we'll pass all the ids onto the delink
@@ -2683,11 +2699,11 @@ namespace OpenSim.Region.ClientStack
2683 List<uint> prims = new List<uint>(); 2699 List<uint> prims = new List<uint>();
2684 for (int i = 0; i < delink.ObjectData.Length; i++) 2700 for (int i = 0; i < delink.ObjectData.Length; i++)
2685 { 2701 {
2686 prims.Add(delink.ObjectData[i].ObjectLocalID); 2702 prims.Add(delink.ObjectData[i].ObjectLocalID);
2687 } 2703 }
2688 2704
2689 if (OnDelinkObjects != null) 2705 if (OnDelinkObjects != null)
2690 { 2706 {
2691 OnDelinkObjects(prims); 2707 OnDelinkObjects(prims);
2692 } 2708 }
2693 2709
@@ -2706,7 +2722,8 @@ namespace OpenSim.Region.ClientStack
2706 { 2722 {
2707 if (OnUpdatePrimShape != null) 2723 if (OnUpdatePrimShape != null)
2708 { 2724 {
2709 OnUpdatePrimShape(this.m_agentId, shapePacket.ObjectData[i].ObjectLocalID, shapePacket.ObjectData[i]); 2725 OnUpdatePrimShape(m_agentId, shapePacket.ObjectData[i].ObjectLocalID,
2726 shapePacket.ObjectData[i]);
2710 } 2727 }
2711 } 2728 }
2712 break; 2729 break;
@@ -2714,7 +2731,8 @@ namespace OpenSim.Region.ClientStack
2714 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket) Pack; 2731 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket) Pack;
2715 if (OnUpdateExtraParams != null) 2732 if (OnUpdateExtraParams != null)
2716 { 2733 {
2717 OnUpdateExtraParams(this.m_agentId, extraPar.ObjectData[0].ObjectLocalID, extraPar.ObjectData[0].ParamType, 2734 OnUpdateExtraParams(m_agentId, extraPar.ObjectData[0].ObjectLocalID,
2735 extraPar.ObjectData[0].ParamType,
2718 extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData); 2736 extraPar.ObjectData[0].ParamInUse, extraPar.ObjectData[0].ParamData);
2719 } 2737 }
2720 break; 2738 break;
@@ -2726,7 +2744,8 @@ namespace OpenSim.Region.ClientStack
2726 if (OnObjectDuplicate != null) 2744 if (OnObjectDuplicate != null)
2727 { 2745 {
2728 OnObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset, 2746 OnObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset,
2729 dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID, AgentandGroupData.GroupID); 2747 dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID,
2748 AgentandGroupData.GroupID);
2730 } 2749 }
2731 } 2750 }
2732 2751
@@ -2809,21 +2828,23 @@ namespace OpenSim.Region.ClientStack
2809 { 2828 {
2810 if (OnObjectName != null) 2829 if (OnObjectName != null)
2811 { 2830 {
2812 OnObjectName(this, objName.ObjectData[i].LocalID, m_encoding.GetString(objName.ObjectData[i].Name)); 2831 OnObjectName(this, objName.ObjectData[i].LocalID,
2832 m_encoding.GetString(objName.ObjectData[i].Name));
2813 } 2833 }
2814 } 2834 }
2815 break; 2835 break;
2816 case PacketType.ObjectPermissions: 2836 case PacketType.ObjectPermissions:
2817 MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString()); 2837 MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString());
2818 ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; 2838 ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket) Pack;
2839
2840 List<ObjectPermissionsPacket.ObjectDataBlock> permChanges =
2841 new List<ObjectPermissionsPacket.ObjectDataBlock>();
2819 2842
2820 List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = new List<ObjectPermissionsPacket.ObjectDataBlock>();
2821
2822 for (int i = 0; i < newobjPerms.ObjectData.Length; i++) 2843 for (int i = 0; i < newobjPerms.ObjectData.Length; i++)
2823 { 2844 {
2824 permChanges.Add(newobjPerms.ObjectData[i]); 2845 permChanges.Add(newobjPerms.ObjectData[i]);
2825 } 2846 }
2826 2847
2827 // Here's our data, 2848 // Here's our data,
2828 // PermField contains the field the info goes into 2849 // PermField contains the field the info goes into
2829 // PermField determines which mask we're changing 2850 // PermField determines which mask we're changing
@@ -2847,16 +2868,15 @@ namespace OpenSim.Region.ClientStack
2847 2868
2848 case PacketType.RequestObjectPropertiesFamily: 2869 case PacketType.RequestObjectPropertiesFamily:
2849 //This powers the little tooltip that appears when you move your mouse over an object 2870 //This powers the little tooltip that appears when you move your mouse over an object
2850 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; 2871 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket) Pack;
2851 2872
2852 2873
2853 RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; 2874 RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData;
2854 2875
2855 if (OnRequestObjectPropertiesFamily != null) 2876 if (OnRequestObjectPropertiesFamily != null)
2856 { 2877 {
2857 OnRequestObjectPropertiesFamily(this, this.m_agentId, packObjBlock.RequestFlags, packObjBlock.ObjectID); 2878 OnRequestObjectPropertiesFamily(this, m_agentId, packObjBlock.RequestFlags,
2858 2879 packObjBlock.ObjectID);
2859
2860 } 2880 }
2861 2881
2862 break; 2882 break;
@@ -2882,7 +2902,7 @@ namespace OpenSim.Region.ClientStack
2882 OnRequestTexture(this, args); 2902 OnRequestTexture(this, args);
2883 } 2903 }
2884 2904
2885 // m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image, 2905 // m_assetCache.AddTextureRequest(this, imageRequest.RequestImage[i].Image,
2886 // imageRequest.RequestImage[i].Packet, 2906 // imageRequest.RequestImage[i].Packet,
2887 // imageRequest.RequestImage[i].DiscardLevel); 2907 // imageRequest.RequestImage[i].DiscardLevel);
2888 } 2908 }
@@ -2898,10 +2918,11 @@ namespace OpenSim.Region.ClientStack
2898 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); 2918 // Console.WriteLine("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
2899 if (OnAssetUploadRequest != null) 2919 if (OnAssetUploadRequest != null)
2900 { 2920 {
2901 LLUUID temp=libsecondlife.LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); 2921 LLUUID temp = LLUUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
2902 OnAssetUploadRequest(this, temp, 2922 OnAssetUploadRequest(this, temp,
2903 request.AssetBlock.TransactionID, request.AssetBlock.Type, 2923 request.AssetBlock.TransactionID, request.AssetBlock.Type,
2904 request.AssetBlock.AssetData, request.AssetBlock.StoreLocal, request.AssetBlock.Tempfile); 2924 request.AssetBlock.AssetData, request.AssetBlock.StoreLocal,
2925 request.AssetBlock.Tempfile);
2905 } 2926 }
2906 break; 2927 break;
2907 case PacketType.RequestXfer: 2928 case PacketType.RequestXfer:
@@ -2938,24 +2959,24 @@ namespace OpenSim.Region.ClientStack
2938 case PacketType.UpdateInventoryFolder: 2959 case PacketType.UpdateInventoryFolder:
2939 if (OnUpdateInventoryFolder != null) 2960 if (OnUpdateInventoryFolder != null)
2940 { 2961 {
2941 UpdateInventoryFolderPacket invFolder = (UpdateInventoryFolderPacket)Pack; 2962 UpdateInventoryFolderPacket invFolder = (UpdateInventoryFolderPacket) Pack;
2942 for (int i = 0; i < invFolder.FolderData.Length; i++) 2963 for (int i = 0; i < invFolder.FolderData.Length; i++)
2943 { 2964 {
2944 OnUpdateInventoryFolder(this, invFolder.FolderData[i].FolderID, 2965 OnUpdateInventoryFolder(this, invFolder.FolderData[i].FolderID,
2945 (ushort)invFolder.FolderData[i].Type, 2966 (ushort) invFolder.FolderData[i].Type,
2946 Util.FieldToString(invFolder.FolderData[i].Name), 2967 Util.FieldToString(invFolder.FolderData[i].Name),
2947 invFolder.FolderData[i].ParentID); 2968 invFolder.FolderData[i].ParentID);
2948 } 2969 }
2949 } 2970 }
2950 break; 2971 break;
2951 case PacketType.MoveInventoryFolder: 2972 case PacketType.MoveInventoryFolder:
2952 if (OnMoveInventoryFolder != null) 2973 if (OnMoveInventoryFolder != null)
2953 { 2974 {
2954 MoveInventoryFolderPacket invFolder = (MoveInventoryFolderPacket)Pack; 2975 MoveInventoryFolderPacket invFolder = (MoveInventoryFolderPacket) Pack;
2955 for (int i = 0; i < invFolder.InventoryData.Length; i++) 2976 for (int i = 0; i < invFolder.InventoryData.Length; i++)
2956 { 2977 {
2957 OnMoveInventoryFolder(this, invFolder.InventoryData[i].FolderID, 2978 OnMoveInventoryFolder(this, invFolder.InventoryData[i].FolderID,
2958 invFolder.InventoryData[i].ParentID); 2979 invFolder.InventoryData[i].ParentID);
2959 } 2980 }
2960 } 2981 }
2961 break; 2982 break;
@@ -2997,7 +3018,7 @@ namespace OpenSim.Region.ClientStack
2997 case PacketType.PurgeInventoryDescendents: 3018 case PacketType.PurgeInventoryDescendents:
2998 if (OnPurgeInventoryDescendents != null) 3019 if (OnPurgeInventoryDescendents != null)
2999 { 3020 {
3000 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; 3021 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket) Pack;
3001 OnPurgeInventoryDescendents(this, Purge.InventoryData.FolderID); 3022 OnPurgeInventoryDescendents(this, Purge.InventoryData.FolderID);
3002 } 3023 }
3003 break; 3024 break;
@@ -3007,11 +3028,11 @@ namespace OpenSim.Region.ClientStack
3007 { 3028 {
3008 for (int i = 0; i < update.InventoryData.Length; i++) 3029 for (int i = 0; i < update.InventoryData.Length; i++)
3009 { 3030 {
3010 OnUpdateInventoryItem(this, update.InventoryData[i].TransactionID, 3031 OnUpdateInventoryItem(this, update.InventoryData[i].TransactionID,
3011 update.InventoryData[i].ItemID, 3032 update.InventoryData[i].ItemID,
3012 Util.FieldToString(update.InventoryData[i].Name), 3033 Util.FieldToString(update.InventoryData[i].Name),
3013 Util.FieldToString(update.InventoryData[i].Description), 3034 Util.FieldToString(update.InventoryData[i].Description),
3014 update.InventoryData[i].NextOwnerMask); 3035 update.InventoryData[i].NextOwnerMask);
3015 } 3036 }
3016 } 3037 }
3017 //Console.WriteLine(Pack.ToString()); 3038 //Console.WriteLine(Pack.ToString());
@@ -3051,17 +3072,20 @@ namespace OpenSim.Region.ClientStack
3051 { 3072 {
3052 foreach (CopyInventoryItemPacket.InventoryDataBlock datablock in copyitem.InventoryData) 3073 foreach (CopyInventoryItemPacket.InventoryDataBlock datablock in copyitem.InventoryData)
3053 { 3074 {
3054 OnCopyInventoryItem(this, datablock.CallbackID, datablock.OldAgentID, datablock.OldItemID, datablock.NewFolderID, Util.FieldToString(datablock.NewName)); 3075 OnCopyInventoryItem(this, datablock.CallbackID, datablock.OldAgentID,
3076 datablock.OldItemID, datablock.NewFolderID,
3077 Util.FieldToString(datablock.NewName));
3055 } 3078 }
3056 } 3079 }
3057 break; 3080 break;
3058 case PacketType.MoveInventoryItem: 3081 case PacketType.MoveInventoryItem:
3059 MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack; 3082 MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket) Pack;
3060 if (OnMoveInventoryItem != null) 3083 if (OnMoveInventoryItem != null)
3061 { 3084 {
3062 foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData) 3085 foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData)
3063 { 3086 {
3064 OnMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length, Util.FieldToString(datablock.NewName)); 3087 OnMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length,
3088 Util.FieldToString(datablock.NewName));
3065 } 3089 }
3066 } 3090 }
3067 break; 3091 break;
@@ -3115,7 +3139,7 @@ namespace OpenSim.Region.ClientStack
3115 case PacketType.MapNameRequest: 3139 case PacketType.MapNameRequest:
3116 MapNameRequestPacket map = (MapNameRequestPacket) Pack; 3140 MapNameRequestPacket map = (MapNameRequestPacket) Pack;
3117 string mapName = UTF8Encoding.UTF8.GetString(map.NameData.Name, 0, 3141 string mapName = UTF8Encoding.UTF8.GetString(map.NameData.Name, 0,
3118 map.NameData.Name.Length - 1); 3142 map.NameData.Name.Length - 1);
3119 if (OnMapNameRequest != null) 3143 if (OnMapNameRequest != null)
3120 { 3144 {
3121 OnMapNameRequest(this, mapName); 3145 OnMapNameRequest(this, mapName);
@@ -3202,29 +3226,34 @@ namespace OpenSim.Region.ClientStack
3202 break; 3226 break;
3203 3227
3204 #region Parcel related packets 3228 #region Parcel related packets
3229
3205 case PacketType.ParcelAccessListRequest: 3230 case PacketType.ParcelAccessListRequest:
3206 ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; 3231 ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket) Pack;
3207 if (OnParcelAccessListRequest != null) 3232 if (OnParcelAccessListRequest != null)
3208 { 3233 {
3209 OnParcelAccessListRequest(requestPacket.AgentData.AgentID, requestPacket.AgentData.SessionID, requestPacket.Data.Flags, requestPacket.Data.SequenceID, requestPacket.Data.LocalID,this); 3234 OnParcelAccessListRequest(requestPacket.AgentData.AgentID, requestPacket.AgentData.SessionID,
3235 requestPacket.Data.Flags, requestPacket.Data.SequenceID,
3236 requestPacket.Data.LocalID, this);
3210 } 3237 }
3211 break; 3238 break;
3212 3239
3213 case PacketType.ParcelAccessListUpdate: 3240 case PacketType.ParcelAccessListUpdate:
3214 ParcelAccessListUpdatePacket updatePacket = (ParcelAccessListUpdatePacket)Pack; 3241 ParcelAccessListUpdatePacket updatePacket = (ParcelAccessListUpdatePacket) Pack;
3215 List<ParcelManager.ParcelAccessEntry> entries = new List<ParcelManager.ParcelAccessEntry>(); 3242 List<ParcelManager.ParcelAccessEntry> entries = new List<ParcelManager.ParcelAccessEntry>();
3216 foreach (ParcelAccessListUpdatePacket.ListBlock block in updatePacket.List) 3243 foreach (ParcelAccessListUpdatePacket.ListBlock block in updatePacket.List)
3217 { 3244 {
3218 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 3245 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
3219 entry.AgentID = block.ID; 3246 entry.AgentID = block.ID;
3220 entry.Flags = (ParcelManager.AccessList)block.Flags; 3247 entry.Flags = (ParcelManager.AccessList) block.Flags;
3221 entry.Time = new DateTime(); 3248 entry.Time = new DateTime();
3222 entries.Add(entry); 3249 entries.Add(entry);
3223 } 3250 }
3224 3251
3225 if (OnParcelAccessListUpdateRequest != null) 3252 if (OnParcelAccessListUpdateRequest != null)
3226 { 3253 {
3227 OnParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID, updatePacket.AgentData.SessionID, updatePacket.Data.Flags, updatePacket.Data.LocalID, entries, this); 3254 OnParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID,
3255 updatePacket.AgentData.SessionID, updatePacket.Data.Flags,
3256 updatePacket.Data.LocalID, entries, this);
3228 } 3257 }
3229 break; 3258 break;
3230 case PacketType.ParcelPropertiesRequest: 3259 case PacketType.ParcelPropertiesRequest:
@@ -3296,28 +3325,30 @@ namespace OpenSim.Region.ClientStack
3296 } 3325 }
3297 break; 3326 break;
3298 case PacketType.RequestRegionInfo: 3327 case PacketType.RequestRegionInfo:
3299 RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; 3328 RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket) Pack).AgentData;
3300 if (OnRegionInfoRequest != null) 3329 if (OnRegionInfoRequest != null)
3301 { 3330 {
3302 OnRegionInfoRequest(this, mPacket.SessionID); 3331 OnRegionInfoRequest(this, mPacket.SessionID);
3303 } 3332 }
3304 break; 3333 break;
3305 case PacketType.EstateCovenantRequest: 3334 case PacketType.EstateCovenantRequest:
3306 // TODO: handle this packet 3335 // TODO: handle this packet
3307 EstateCovenantRequestPacket.AgentDataBlock epack = ((EstateCovenantRequestPacket)Pack).AgentData; 3336 EstateCovenantRequestPacket.AgentDataBlock epack =
3337 ((EstateCovenantRequestPacket) Pack).AgentData;
3308 if (OnEstateCovenantRequest != null) 3338 if (OnEstateCovenantRequest != null)
3309 { 3339 {
3310 OnEstateCovenantRequest(this, epack.SessionID); 3340 OnEstateCovenantRequest(this, epack.SessionID);
3311 } 3341 }
3312 break; 3342 break;
3313 case PacketType.AgentThrottle: 3343 case PacketType.AgentThrottle:
3314 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack; 3344 AgentThrottlePacket atpack = (AgentThrottlePacket) Pack;
3315 m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles); 3345 m_packetQueue.SetThrottleFromClient(atpack.Throttle.Throttles);
3316 break; 3346 break;
3317 3347
3318 #endregion 3348 #endregion
3319 3349
3320 #region unimplemented handlers 3350 #region unimplemented handlers
3351
3321 case PacketType.RequestGodlikePowers: 3352 case PacketType.RequestGodlikePowers:
3322 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket) Pack; 3353 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket) Pack;
3323 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; 3354 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
@@ -3325,16 +3356,17 @@ namespace OpenSim.Region.ClientStack
3325 RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; 3356 RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData;
3326 3357
3327 OnRequestGodlikePowers(ablock.AgentID, ablock.SessionID, token, this); 3358 OnRequestGodlikePowers(ablock.AgentID, ablock.SessionID, token, this);
3328 3359
3329 break; 3360 break;
3330 case PacketType.GodKickUser: 3361 case PacketType.GodKickUser:
3331 MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet"); 3362 MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet");
3332 3363
3333 GodKickUserPacket gkupack = (GodKickUserPacket) Pack; 3364 GodKickUserPacket gkupack = (GodKickUserPacket) Pack;
3334 3365
3335 if (gkupack.UserInfo.GodSessionID == SessionId && this.AgentId == gkupack.UserInfo.GodID) 3366 if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID)
3336 { 3367 {
3337 OnGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, gkupack.UserInfo.AgentID, (uint) 0, gkupack.UserInfo.Reason); 3368 OnGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID,
3369 gkupack.UserInfo.AgentID, (uint) 0, gkupack.UserInfo.Reason);
3338 } 3370 }
3339 else 3371 else
3340 { 3372 {
@@ -3404,7 +3436,7 @@ namespace OpenSim.Region.ClientStack
3404 // TODO: handle this packet 3436 // TODO: handle this packet
3405 MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet"); 3437 MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet");
3406 break; 3438 break;
3407 3439
3408 case PacketType.ParcelDwellRequest: 3440 case PacketType.ParcelDwellRequest:
3409 // TODO: handle this packet 3441 // TODO: handle this packet
3410 MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet"); 3442 MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet");
@@ -3440,7 +3472,7 @@ namespace OpenSim.Region.ClientStack
3440 default: 3472 default:
3441 MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString()); 3473 MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString());
3442 break; 3474 break;
3443 3475
3444 #endregion 3476 #endregion
3445 } 3477 }
3446 } 3478 }
@@ -3490,4 +3522,4 @@ namespace OpenSim.Region.ClientStack
3490 OutPacket(logReply, ThrottleOutPacketType.Task); 3522 OutPacket(logReply, ThrottleOutPacketType.Task);
3491 } 3523 }
3492 } 3524 }
3493} 3525} \ No newline at end of file