diff options
After seeing sdague do his happy dance over trunk working "the best he has ever seen". I'm not sure I should be doing this commit, but oh well.
So anyway, it moves the Asset downloading (packet sending) to a module (AssetDownloadModule).
So now at last, AssetCache should be just dealing with fetching assets from the asset server and caching them.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.cs | 147 |
1 files changed, 77 insertions, 70 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index de3e29d..55c5726 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -51,10 +51,10 @@ namespace OpenSim.Region.ClientStack | |||
51 | /// </summary> | 51 | /// </summary> |
52 | public class ClientView : IClientAPI | 52 | public class ClientView : IClientAPI |
53 | { | 53 | { |
54 | // ~ClientView() | 54 | // ~ClientView() |
55 | // { | 55 | // { |
56 | // System.Console.WriteLine("[CLIENTVIEW]: Destructor called"); | 56 | // System.Console.WriteLine("[CLIENTVIEW]: Destructor called"); |
57 | // } | 57 | // } |
58 | 58 | ||
59 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 59 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
60 | 60 | ||
@@ -119,7 +119,7 @@ namespace OpenSim.Region.ClientStack | |||
119 | protected LLVector3 m_startpos; | 119 | protected LLVector3 m_startpos; |
120 | protected EndPoint m_userEndPoint; | 120 | protected EndPoint m_userEndPoint; |
121 | 121 | ||
122 | /* Instantiated Designated Event Delegates */ | 122 | /* Instantiated Designated Event Delegates */ |
123 | //- used so we don't create new objects for each incoming packet and then toss it out later */ | 123 | //- used so we don't create new objects for each incoming packet and then toss it out later */ |
124 | 124 | ||
125 | private RequestAvatarProperties handler001 = null; //OnRequestAvatarProperties; | 125 | private RequestAvatarProperties handler001 = null; //OnRequestAvatarProperties; |
@@ -214,7 +214,8 @@ namespace OpenSim.Region.ClientStack | |||
214 | private UpdateVector handler089 = null; //OnUpdatePrimGroupPosition; | 214 | private UpdateVector handler089 = null; //OnUpdatePrimGroupPosition; |
215 | private UpdatePrimRotation handler090 = null; //OnUpdatePrimGroupRotation; | 215 | private UpdatePrimRotation handler090 = null; //OnUpdatePrimGroupRotation; |
216 | private UpdatePrimGroupRotation handler091 = null; //OnUpdatePrimGroupMouseRotation; | 216 | private UpdatePrimGroupRotation handler091 = null; //OnUpdatePrimGroupMouseRotation; |
217 | private PacketStats handler093 = null; // OnPacketStats; | 217 | private PacketStats handler093 = null; // OnPacketStats;# |
218 | private RequestAsset handler094 = null; // OnRequestAsset; | ||
218 | 219 | ||
219 | 220 | ||
220 | /* Properties */ | 221 | /* Properties */ |
@@ -363,7 +364,7 @@ namespace OpenSim.Region.ClientStack | |||
363 | // We can't reach into other scenes and close the connection | 364 | // We can't reach into other scenes and close the connection |
364 | // We need to do this over grid communications | 365 | // We need to do this over grid communications |
365 | //m_scene.CloseAllAgents(CircuitCode); | 366 | //m_scene.CloseAllAgents(CircuitCode); |
366 | 367 | ||
367 | // If we're not shutting down the circuit, then this is the last time we'll go here. | 368 | // If we're not shutting down the circuit, then this is the last time we'll go here. |
368 | // If we are shutting down the circuit, the UDP Server will come back here with | 369 | // If we are shutting down the circuit, the UDP Server will come back here with |
369 | // ShutDownCircuit = false | 370 | // ShutDownCircuit = false |
@@ -502,7 +503,7 @@ namespace OpenSim.Region.ClientStack | |||
502 | protected virtual void ClientLoop() | 503 | protected virtual void ClientLoop() |
503 | { | 504 | { |
504 | m_log.Info("[CLIENT]: Entered loop"); | 505 | m_log.Info("[CLIENT]: Entered loop"); |
505 | while( true ) | 506 | while (true) |
506 | { | 507 | { |
507 | QueItem nextPacket = m_packetQueue.Dequeue(); | 508 | QueItem nextPacket = m_packetQueue.Dequeue(); |
508 | if (nextPacket.Incoming) | 509 | if (nextPacket.Incoming) |
@@ -690,6 +691,7 @@ namespace OpenSim.Region.ClientStack | |||
690 | public event RezScript OnRezScript; | 691 | public event RezScript OnRezScript; |
691 | public event UpdateTaskInventory OnUpdateTaskInventory; | 692 | public event UpdateTaskInventory OnUpdateTaskInventory; |
692 | public event RemoveTaskInventory OnRemoveTaskItem; | 693 | public event RemoveTaskInventory OnRemoveTaskItem; |
694 | public event RequestAsset OnRequestAsset; | ||
693 | 695 | ||
694 | public event UUIDNameRequest OnNameFromUUIDRequest; | 696 | public event UUIDNameRequest OnNameFromUUIDRequest; |
695 | 697 | ||
@@ -1410,7 +1412,7 @@ namespace OpenSim.Region.ClientStack | |||
1410 | OutPacket(replyPacket, ThrottleOutPacketType.Task); | 1412 | OutPacket(replyPacket, ThrottleOutPacketType.Task); |
1411 | } | 1413 | } |
1412 | 1414 | ||
1413 | public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname,string grouptitle) | 1415 | public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) |
1414 | { | 1416 | { |
1415 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); | 1417 | AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); |
1416 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; | 1418 | sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; |
@@ -1420,7 +1422,7 @@ namespace OpenSim.Region.ClientStack | |||
1420 | sendAgentDataUpdate.AgentData.GroupPowers = grouppowers; | 1422 | sendAgentDataUpdate.AgentData.GroupPowers = grouppowers; |
1421 | sendAgentDataUpdate.AgentData.GroupTitle = Helpers.StringToField(grouptitle); | 1423 | sendAgentDataUpdate.AgentData.GroupTitle = Helpers.StringToField(grouptitle); |
1422 | sendAgentDataUpdate.AgentData.LastName = Helpers.StringToField(lastname); | 1424 | sendAgentDataUpdate.AgentData.LastName = Helpers.StringToField(lastname); |
1423 | OutPacket(sendAgentDataUpdate,ThrottleOutPacketType.Task); | 1425 | OutPacket(sendAgentDataUpdate, ThrottleOutPacketType.Task); |
1424 | } | 1426 | } |
1425 | 1427 | ||
1426 | /// <summary> | 1428 | /// <summary> |
@@ -2329,10 +2331,10 @@ namespace OpenSim.Region.ClientStack | |||
2329 | { | 2331 | { |
2330 | LLUUID partId = part.UUID; | 2332 | LLUUID partId = part.UUID; |
2331 | 2333 | ||
2332 | 2334 | ||
2333 | 2335 | ||
2334 | 2336 | ||
2335 | 2337 | ||
2336 | UpdatePrimRotation handler090 = OnUpdatePrimGroupRotation; | 2338 | UpdatePrimRotation handler090 = OnUpdatePrimGroupRotation; |
2337 | UpdatePrimGroupRotation handler091 = OnUpdatePrimGroupMouseRotation; | 2339 | UpdatePrimGroupRotation handler091 = OnUpdatePrimGroupMouseRotation; |
2338 | 2340 | ||
@@ -2344,7 +2346,7 @@ namespace OpenSim.Region.ClientStack | |||
2344 | handler086 = OnUpdatePrimSinglePosition; | 2346 | handler086 = OnUpdatePrimSinglePosition; |
2345 | if (handler086 != null) | 2347 | if (handler086 != null) |
2346 | { | 2348 | { |
2347 | 2349 | ||
2348 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); | 2350 | // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); |
2349 | handler086(localId, pos1, this); | 2351 | handler086(localId, pos1, this); |
2350 | } | 2352 | } |
@@ -2355,18 +2357,18 @@ namespace OpenSim.Region.ClientStack | |||
2355 | handler087 = OnUpdatePrimSingleRotation; | 2357 | handler087 = OnUpdatePrimSingleRotation; |
2356 | if (handler087 != null) | 2358 | if (handler087 != null) |
2357 | { | 2359 | { |
2358 | 2360 | ||
2359 | //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 2361 | //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
2360 | handler087(localId, rot1, this); | 2362 | handler087(localId, rot1, this); |
2361 | } | 2363 | } |
2362 | break; | 2364 | break; |
2363 | case 3: | 2365 | case 3: |
2364 | 2366 | ||
2365 | LLQuaternion rot2 = new LLQuaternion(block.Data, 12, true); | 2367 | LLQuaternion rot2 = new LLQuaternion(block.Data, 12, true); |
2366 | handler087 = OnUpdatePrimSingleRotation; | 2368 | handler087 = OnUpdatePrimSingleRotation; |
2367 | if (handler087 != null) | 2369 | if (handler087 != null) |
2368 | { | 2370 | { |
2369 | 2371 | ||
2370 | //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 2372 | //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
2371 | handler087(localId, rot2, this); | 2373 | handler087(localId, rot2, this); |
2372 | } | 2374 | } |
@@ -2378,7 +2380,7 @@ namespace OpenSim.Region.ClientStack | |||
2378 | handler088 = OnUpdatePrimScale; | 2380 | handler088 = OnUpdatePrimScale; |
2379 | if (handler088 != null) | 2381 | if (handler088 != null) |
2380 | { | 2382 | { |
2381 | 2383 | ||
2382 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 2384 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
2383 | handler088(localId, scale1, this); | 2385 | handler088(localId, scale1, this); |
2384 | } | 2386 | } |
@@ -2390,18 +2392,18 @@ namespace OpenSim.Region.ClientStack | |||
2390 | 2392 | ||
2391 | if (handler089 != null) | 2393 | if (handler089 != null) |
2392 | { | 2394 | { |
2393 | 2395 | ||
2394 | handler089(localId, pos2, this); | 2396 | handler089(localId, pos2, this); |
2395 | } | 2397 | } |
2396 | break; | 2398 | break; |
2397 | case 10: | 2399 | case 10: |
2398 | 2400 | ||
2399 | LLQuaternion rot3 = new LLQuaternion(block.Data, 0, true); | 2401 | LLQuaternion rot3 = new LLQuaternion(block.Data, 0, true); |
2400 | 2402 | ||
2401 | handler090 = OnUpdatePrimGroupRotation; | 2403 | handler090 = OnUpdatePrimGroupRotation; |
2402 | if (handler090 != null) | 2404 | if (handler090 != null) |
2403 | { | 2405 | { |
2404 | 2406 | ||
2405 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 2407 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
2406 | handler090(localId, rot3, this); | 2408 | handler090(localId, rot3, this); |
2407 | } | 2409 | } |
@@ -2429,7 +2431,7 @@ namespace OpenSim.Region.ClientStack | |||
2429 | handler088 = OnUpdatePrimScale; | 2431 | handler088 = OnUpdatePrimScale; |
2430 | if (handler088 != null) | 2432 | if (handler088 != null) |
2431 | { | 2433 | { |
2432 | 2434 | ||
2433 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); | 2435 | //Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); |
2434 | handler088(localId, scale2, this); | 2436 | handler088(localId, scale2, this); |
2435 | 2437 | ||
@@ -2449,10 +2451,10 @@ namespace OpenSim.Region.ClientStack | |||
2449 | handler088 = OnUpdatePrimScale; | 2451 | handler088 = OnUpdatePrimScale; |
2450 | if (handler088 != null) | 2452 | if (handler088 != null) |
2451 | { | 2453 | { |
2452 | 2454 | ||
2453 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); | 2455 | // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); |
2454 | handler088(localId, scale5, this); | 2456 | handler088(localId, scale5, this); |
2455 | 2457 | ||
2456 | handler086 = OnUpdatePrimSinglePosition; | 2458 | handler086 = OnUpdatePrimSinglePosition; |
2457 | if (handler086 != null) | 2459 | if (handler086 != null) |
2458 | { | 2460 | { |
@@ -2762,7 +2764,7 @@ namespace OpenSim.Region.ClientStack | |||
2762 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) | 2764 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) |
2763 | { | 2765 | { |
2764 | //m_log.Debug("[NETWORK]: Resending " + packet.Type.ToString() + " packet, " + | 2766 | //m_log.Debug("[NETWORK]: Resending " + packet.Type.ToString() + " packet, " + |
2765 | //(now - packet.TickCount) + "ms have passed"); | 2767 | //(now - packet.TickCount) + "ms have passed"); |
2766 | 2768 | ||
2767 | packet.Header.Resent = true; | 2769 | packet.Header.Resent = true; |
2768 | OutPacket(packet, ThrottleOutPacketType.Resend); | 2770 | OutPacket(packet, ThrottleOutPacketType.Resend); |
@@ -2863,13 +2865,13 @@ namespace OpenSim.Region.ClientStack | |||
2863 | 2865 | ||
2864 | case PacketType.AvatarPropertiesRequest: | 2866 | case PacketType.AvatarPropertiesRequest: |
2865 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; | 2867 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; |
2866 | 2868 | ||
2867 | handler001 = OnRequestAvatarProperties; | 2869 | handler001 = OnRequestAvatarProperties; |
2868 | if (handler001 != null) | 2870 | if (handler001 != null) |
2869 | { | 2871 | { |
2870 | handler001(this, avatarProperties.AgentData.AvatarID); | 2872 | handler001(this, avatarProperties.AgentData.AvatarID); |
2871 | } | 2873 | } |
2872 | 2874 | ||
2873 | 2875 | ||
2874 | break; | 2876 | break; |
2875 | case PacketType.ChatFromViewer: | 2877 | case PacketType.ChatFromViewer: |
@@ -2900,7 +2902,7 @@ namespace OpenSim.Region.ClientStack | |||
2900 | handler002(this, args); | 2902 | handler002(this, args); |
2901 | } | 2903 | } |
2902 | 2904 | ||
2903 | 2905 | ||
2904 | 2906 | ||
2905 | break; | 2907 | break; |
2906 | case PacketType.ScriptDialogReply: | 2908 | case PacketType.ScriptDialogReply: |
@@ -2921,7 +2923,7 @@ namespace OpenSim.Region.ClientStack | |||
2921 | if (handler003 != null) | 2923 | if (handler003 != null) |
2922 | handler003(this, args); | 2924 | handler003(this, args); |
2923 | } | 2925 | } |
2924 | 2926 | ||
2925 | break; | 2927 | break; |
2926 | case PacketType.ImprovedInstantMessage: | 2928 | case PacketType.ImprovedInstantMessage: |
2927 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; | 2929 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; |
@@ -2940,7 +2942,7 @@ namespace OpenSim.Region.ClientStack | |||
2940 | msgpack.MessageBlock.BinaryBucket); | 2942 | msgpack.MessageBlock.BinaryBucket); |
2941 | } | 2943 | } |
2942 | 2944 | ||
2943 | 2945 | ||
2944 | break; | 2946 | break; |
2945 | 2947 | ||
2946 | case PacketType.AcceptFriendship: | 2948 | case PacketType.AcceptFriendship: |
@@ -2963,7 +2965,7 @@ namespace OpenSim.Region.ClientStack | |||
2963 | handler005(this, agentID, transactionID, callingCardFolders); | 2965 | handler005(this, agentID, transactionID, callingCardFolders); |
2964 | } | 2966 | } |
2965 | 2967 | ||
2966 | 2968 | ||
2967 | 2969 | ||
2968 | 2970 | ||
2969 | break; | 2971 | break; |
@@ -2977,7 +2979,7 @@ namespace OpenSim.Region.ClientStack | |||
2977 | { | 2979 | { |
2978 | handler006(this, listOwnerAgentID, exFriendID); | 2980 | handler006(this, listOwnerAgentID, exFriendID); |
2979 | } | 2981 | } |
2980 | 2982 | ||
2981 | 2983 | ||
2982 | break; | 2984 | break; |
2983 | case PacketType.RezObject: | 2985 | case PacketType.RezObject: |
@@ -2995,7 +2997,7 @@ namespace OpenSim.Region.ClientStack | |||
2995 | //rezPacket.RezData.RezSelected; | 2997 | //rezPacket.RezData.RezSelected; |
2996 | //rezPacket.RezData.FromTaskID; | 2998 | //rezPacket.RezData.FromTaskID; |
2997 | //m_log.Info("[REZData]: " + rezPacket.ToString()); | 2999 | //m_log.Info("[REZData]: " + rezPacket.ToString()); |
2998 | 3000 | ||
2999 | handler007(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, | 3001 | handler007(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, |
3000 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, | 3002 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, |
3001 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, | 3003 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, |
@@ -3004,7 +3006,7 @@ namespace OpenSim.Region.ClientStack | |||
3004 | rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem, | 3006 | rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem, |
3005 | rezPacket.RezData.FromTaskID); | 3007 | rezPacket.RezData.FromTaskID); |
3006 | } | 3008 | } |
3007 | 3009 | ||
3008 | break; | 3010 | break; |
3009 | case PacketType.DeRezObject: | 3011 | case PacketType.DeRezObject: |
3010 | handler008 = OnDeRezObject; | 3012 | handler008 = OnDeRezObject; |
@@ -3012,7 +3014,7 @@ namespace OpenSim.Region.ClientStack | |||
3012 | { | 3014 | { |
3013 | handler008(Pack, this); | 3015 | handler008(Pack, this); |
3014 | } | 3016 | } |
3015 | 3017 | ||
3016 | break; | 3018 | break; |
3017 | case PacketType.ModifyLand: | 3019 | case PacketType.ModifyLand: |
3018 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | 3020 | ModifyLandPacket modify = (ModifyLandPacket)Pack; |
@@ -3021,7 +3023,7 @@ namespace OpenSim.Region.ClientStack | |||
3021 | { | 3023 | { |
3022 | if (OnModifyTerrain != null) | 3024 | if (OnModifyTerrain != null) |
3023 | { | 3025 | { |
3024 | 3026 | ||
3025 | for (int i = 0; i < modify.ParcelData.Length; i++) | 3027 | for (int i = 0; i < modify.ParcelData.Length; i++) |
3026 | { | 3028 | { |
3027 | handler009 = OnModifyTerrain; | 3029 | handler009 = OnModifyTerrain; |
@@ -3036,7 +3038,7 @@ namespace OpenSim.Region.ClientStack | |||
3036 | } | 3038 | } |
3037 | } | 3039 | } |
3038 | } | 3040 | } |
3039 | 3041 | ||
3040 | break; | 3042 | break; |
3041 | case PacketType.RegionHandshakeReply: | 3043 | case PacketType.RegionHandshakeReply: |
3042 | 3044 | ||
@@ -3045,7 +3047,7 @@ namespace OpenSim.Region.ClientStack | |||
3045 | { | 3047 | { |
3046 | handler010(this); | 3048 | handler010(this); |
3047 | } | 3049 | } |
3048 | 3050 | ||
3049 | break; | 3051 | break; |
3050 | case PacketType.AgentWearablesRequest: | 3052 | case PacketType.AgentWearablesRequest: |
3051 | handler011 = OnRequestWearables; | 3053 | handler011 = OnRequestWearables; |
@@ -3054,7 +3056,7 @@ namespace OpenSim.Region.ClientStack | |||
3054 | { | 3056 | { |
3055 | handler011(); | 3057 | handler011(); |
3056 | } | 3058 | } |
3057 | 3059 | ||
3058 | 3060 | ||
3059 | handler012 = OnRequestAvatarsData; | 3061 | handler012 = OnRequestAvatarsData; |
3060 | 3062 | ||
@@ -3063,7 +3065,7 @@ namespace OpenSim.Region.ClientStack | |||
3063 | handler012(this); | 3065 | handler012(this); |
3064 | } | 3066 | } |
3065 | 3067 | ||
3066 | 3068 | ||
3067 | break; | 3069 | break; |
3068 | case PacketType.AgentSetAppearance: | 3070 | case PacketType.AgentSetAppearance: |
3069 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; | 3071 | AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; |
@@ -3073,7 +3075,7 @@ namespace OpenSim.Region.ClientStack | |||
3073 | { | 3075 | { |
3074 | handler013(appear.ObjectData.TextureEntry, appear.VisualParam); | 3076 | handler013(appear.ObjectData.TextureEntry, appear.VisualParam); |
3075 | } | 3077 | } |
3076 | 3078 | ||
3077 | break; | 3079 | break; |
3078 | case PacketType.AgentIsNowWearing: | 3080 | case PacketType.AgentIsNowWearing: |
3079 | if (OnAvatarNowWearing != null) | 3081 | if (OnAvatarNowWearing != null) |
@@ -3094,7 +3096,7 @@ namespace OpenSim.Region.ClientStack | |||
3094 | handler014(this, wearingArgs); | 3096 | handler014(this, wearingArgs); |
3095 | } | 3097 | } |
3096 | 3098 | ||
3097 | 3099 | ||
3098 | } | 3100 | } |
3099 | break; | 3101 | break; |
3100 | case PacketType.RezSingleAttachmentFromInv: | 3102 | case PacketType.RezSingleAttachmentFromInv: |
@@ -3102,28 +3104,28 @@ namespace OpenSim.Region.ClientStack | |||
3102 | handler015 = OnRezSingleAttachmentFromInv; | 3104 | handler015 = OnRezSingleAttachmentFromInv; |
3103 | if (handler015 != null) | 3105 | if (handler015 != null) |
3104 | { | 3106 | { |
3105 | RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket) Pack; | 3107 | RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket)Pack; |
3106 | handler015(this, rez.ObjectData.ItemID, | 3108 | handler015(this, rez.ObjectData.ItemID, |
3107 | rez.ObjectData.AttachmentPt, rez.ObjectData.ItemFlags, rez.ObjectData.NextOwnerMask); | 3109 | rez.ObjectData.AttachmentPt, rez.ObjectData.ItemFlags, rez.ObjectData.NextOwnerMask); |
3108 | } | 3110 | } |
3109 | 3111 | ||
3110 | break; | 3112 | break; |
3111 | case PacketType.ObjectAttach: | 3113 | case PacketType.ObjectAttach: |
3112 | 3114 | ||
3113 | 3115 | ||
3114 | if (OnObjectAttach != null) | 3116 | if (OnObjectAttach != null) |
3115 | { | 3117 | { |
3116 | ObjectAttachPacket att = (ObjectAttachPacket)Pack; | 3118 | ObjectAttachPacket att = (ObjectAttachPacket)Pack; |
3117 | 3119 | ||
3118 | handler016 = OnObjectAttach; | 3120 | handler016 = OnObjectAttach; |
3119 | 3121 | ||
3120 | if (handler016 != null) | 3122 | if (handler016 != null) |
3121 | { | 3123 | { |
3122 | handler016(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation); | 3124 | handler016(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation); |
3123 | } | 3125 | } |
3124 | } | 3126 | } |
3125 | 3127 | ||
3126 | break; | 3128 | break; |
3127 | case PacketType.SetAlwaysRun: | 3129 | case PacketType.SetAlwaysRun: |
3128 | SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; | 3130 | SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack; |
3129 | 3131 | ||
@@ -3131,7 +3133,7 @@ namespace OpenSim.Region.ClientStack | |||
3131 | if (handler017 != null) | 3133 | if (handler017 != null) |
3132 | handler017(this, run.AgentData.AlwaysRun); | 3134 | handler017(this, run.AgentData.AlwaysRun); |
3133 | 3135 | ||
3134 | 3136 | ||
3135 | 3137 | ||
3136 | break; | 3138 | break; |
3137 | case PacketType.CompleteAgentMovement: | 3139 | case PacketType.CompleteAgentMovement: |
@@ -3243,7 +3245,7 @@ namespace OpenSim.Region.ClientStack | |||
3243 | 3245 | ||
3244 | case PacketType.SetStartLocationRequest: | 3246 | case PacketType.SetStartLocationRequest: |
3245 | SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; | 3247 | SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack; |
3246 | 3248 | ||
3247 | if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) | 3249 | if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId) |
3248 | { | 3250 | { |
3249 | handler027 = OnSetStartLocationRequest; | 3251 | handler027 = OnSetStartLocationRequest; |
@@ -3494,7 +3496,7 @@ namespace OpenSim.Region.ClientStack | |||
3494 | byte set = permChanges.Set; | 3496 | byte set = permChanges.Set; |
3495 | 3497 | ||
3496 | handler043 = OnObjectPermissions; | 3498 | handler043 = OnObjectPermissions; |
3497 | 3499 | ||
3498 | if (handler043 != null) | 3500 | if (handler043 != null) |
3499 | OnObjectPermissions(this, AgentID, SessionID, field, localID, mask, set); | 3501 | OnObjectPermissions(this, AgentID, SessionID, field, localID, mask, set); |
3500 | } | 3502 | } |
@@ -3539,7 +3541,7 @@ namespace OpenSim.Region.ClientStack | |||
3539 | case PacketType.RequestImage: | 3541 | case PacketType.RequestImage: |
3540 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; | 3542 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; |
3541 | //Console.WriteLine("image request: " + Pack.ToString()); | 3543 | //Console.WriteLine("image request: " + Pack.ToString()); |
3542 | 3544 | ||
3543 | handler045 = null; | 3545 | handler045 = null; |
3544 | 3546 | ||
3545 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) | 3547 | for (int i = 0; i < imageRequest.RequestImage.Length; i++) |
@@ -3551,9 +3553,9 @@ namespace OpenSim.Region.ClientStack | |||
3551 | args.DiscardLevel = imageRequest.RequestImage[i].DiscardLevel; | 3553 | args.DiscardLevel = imageRequest.RequestImage[i].DiscardLevel; |
3552 | args.PacketNumber = imageRequest.RequestImage[i].Packet; | 3554 | args.PacketNumber = imageRequest.RequestImage[i].Packet; |
3553 | args.Priority = imageRequest.RequestImage[i].DownloadPriority; | 3555 | args.Priority = imageRequest.RequestImage[i].DownloadPriority; |
3554 | 3556 | ||
3555 | handler045 = OnRequestTexture; | 3557 | handler045 = OnRequestTexture; |
3556 | 3558 | ||
3557 | if (handler045 != null) | 3559 | if (handler045 != null) |
3558 | OnRequestTexture(this, args); | 3560 | OnRequestTexture(this, args); |
3559 | } | 3561 | } |
@@ -3562,7 +3564,12 @@ namespace OpenSim.Region.ClientStack | |||
3562 | case PacketType.TransferRequest: | 3564 | case PacketType.TransferRequest: |
3563 | //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request"); | 3565 | //Console.WriteLine("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request"); |
3564 | TransferRequestPacket transfer = (TransferRequestPacket)Pack; | 3566 | TransferRequestPacket transfer = (TransferRequestPacket)Pack; |
3565 | m_assetCache.AddAssetRequest(this, transfer); | 3567 | // m_assetCache.AddAssetRequest(this, transfer); |
3568 | handler094 = OnRequestAsset; | ||
3569 | if (handler094 != null) | ||
3570 | { | ||
3571 | handler094(this, transfer); | ||
3572 | } | ||
3566 | break; | 3573 | break; |
3567 | case PacketType.AssetUploadRequest: | 3574 | case PacketType.AssetUploadRequest: |
3568 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; | 3575 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; |
@@ -3606,7 +3613,7 @@ namespace OpenSim.Region.ClientStack | |||
3606 | handler049 = OnConfirmXfer; | 3613 | handler049 = OnConfirmXfer; |
3607 | if (handler049 != null) | 3614 | if (handler049 != null) |
3608 | { | 3615 | { |
3609 | handler049(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet); | 3616 | handler049(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet); |
3610 | } | 3617 | } |
3611 | break; | 3618 | break; |
3612 | case PacketType.CreateInventoryFolder: | 3619 | case PacketType.CreateInventoryFolder: |
@@ -3615,7 +3622,7 @@ namespace OpenSim.Region.ClientStack | |||
3615 | handler050 = OnCreateNewInventoryFolder; | 3622 | handler050 = OnCreateNewInventoryFolder; |
3616 | if (handler050 != null) | 3623 | if (handler050 != null) |
3617 | { | 3624 | { |
3618 | 3625 | ||
3619 | handler050(this, invFolder.FolderData.FolderID, | 3626 | handler050(this, invFolder.FolderData.FolderID, |
3620 | (ushort)invFolder.FolderData.Type, | 3627 | (ushort)invFolder.FolderData.Type, |
3621 | Util.FieldToString(invFolder.FolderData.Name), | 3628 | Util.FieldToString(invFolder.FolderData.Name), |
@@ -3709,7 +3716,7 @@ namespace OpenSim.Region.ClientStack | |||
3709 | } | 3716 | } |
3710 | break; | 3717 | break; |
3711 | case PacketType.PurgeInventoryDescendents: | 3718 | case PacketType.PurgeInventoryDescendents: |
3712 | 3719 | ||
3713 | PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; | 3720 | PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; |
3714 | 3721 | ||
3715 | handler056 = OnPurgeInventoryDescendents; | 3722 | handler056 = OnPurgeInventoryDescendents; |
@@ -4130,7 +4137,7 @@ namespace OpenSim.Region.ClientStack | |||
4130 | } | 4137 | } |
4131 | break; | 4138 | break; |
4132 | case PacketType.EstateCovenantRequest: | 4139 | case PacketType.EstateCovenantRequest: |
4133 | 4140 | ||
4134 | EstateCovenantRequestPacket.AgentDataBlock epack = | 4141 | EstateCovenantRequestPacket.AgentDataBlock epack = |
4135 | ((EstateCovenantRequestPacket)Pack).AgentData; | 4142 | ((EstateCovenantRequestPacket)Pack).AgentData; |
4136 | 4143 | ||
@@ -4246,9 +4253,9 @@ namespace OpenSim.Region.ClientStack | |||
4246 | m_log.Warn("[CLIENT]: unhandled MuteListRequest packet"); | 4253 | m_log.Warn("[CLIENT]: unhandled MuteListRequest packet"); |
4247 | break; | 4254 | break; |
4248 | //case PacketType.AgentDataUpdateRequest: | 4255 | //case PacketType.AgentDataUpdateRequest: |
4249 | // TODO: handle this packet | 4256 | // TODO: handle this packet |
4250 | //m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet"); | 4257 | //m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet"); |
4251 | //break; | 4258 | //break; |
4252 | 4259 | ||
4253 | case PacketType.ParcelDwellRequest: | 4260 | case PacketType.ParcelDwellRequest: |
4254 | // TODO: handle this packet | 4261 | // TODO: handle this packet |
@@ -4275,9 +4282,9 @@ namespace OpenSim.Region.ClientStack | |||
4275 | m_log.Warn("[CLIENT]: unhandled SoundTrigger packet"); | 4282 | m_log.Warn("[CLIENT]: unhandled SoundTrigger packet"); |
4276 | break; | 4283 | break; |
4277 | //case PacketType.UserInfoRequest: | 4284 | //case PacketType.UserInfoRequest: |
4278 | // TODO: handle this packet | 4285 | // TODO: handle this packet |
4279 | //m_log.Warn("[CLIENT]: unhandled UserInfoRequest packet"); | 4286 | //m_log.Warn("[CLIENT]: unhandled UserInfoRequest packet"); |
4280 | //break; | 4287 | //break; |
4281 | case PacketType.InventoryDescendents: | 4288 | case PacketType.InventoryDescendents: |
4282 | // TODO: handle this packet | 4289 | // TODO: handle this packet |
4283 | m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); | 4290 | m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); |