aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs264
1 files changed, 18 insertions, 246 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 806269f..f76db1e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -723,11 +723,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
723 if (!m_packetHandlers.ContainsKey(packetType)) 723 if (!m_packetHandlers.ContainsKey(packetType))
724 { 724 {
725 m_packetHandlers.Add( 725 m_packetHandlers.Add(
726<<<<<<< HEAD
727 packetType, new PacketProcessor() { method = handler, Async = doAsync, InEngine = inEngine }); 726 packetType, new PacketProcessor() { method = handler, Async = doAsync, InEngine = inEngine });
728=======
729 packetType, new PacketProcessor() { method = handler, Async = doAsync });
730>>>>>>> avn/ubitvar
731 result = true; 727 result = true;
732 } 728 }
733 } 729 }
@@ -1228,15 +1224,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1228 /// <param name="map">heightmap</param> 1224 /// <param name="map">heightmap</param>
1229 public virtual void SendLayerData(float[] map) 1225 public virtual void SendLayerData(float[] map)
1230 { 1226 {
1231<<<<<<< HEAD
1232 Util.FireAndForget(DoSendLayerData, m_scene.Heightmap.GetTerrainData(), "LLClientView.DoSendLayerData"); 1227 Util.FireAndForget(DoSendLayerData, m_scene.Heightmap.GetTerrainData(), "LLClientView.DoSendLayerData");
1233=======
1234 Util.FireAndForget(DoSendLayerData, m_scene.Heightmap.GetTerrainData());
1235 1228
1236 // Send it sync, and async. It's not that much data 1229 // Send it sync, and async. It's not that much data
1237 // and it improves user experience just so much! 1230 // and it improves user experience just so much!
1238// DoSendLayerData(map); 1231// DoSendLayerData(map);
1239>>>>>>> avn/ubitvar
1240 } 1232 }
1241 1233
1242 /// <summary> 1234 /// <summary>
@@ -1250,18 +1242,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1250 try 1242 try
1251 { 1243 {
1252 // Send LayerData in typerwriter pattern 1244 // Send LayerData in typerwriter pattern
1253<<<<<<< HEAD 1245
1254 //for (int y = 0; y < 16; y++)
1255 //{
1256 // for (int x = 0; x < 16; x++)
1257 // {
1258 // SendLayerData(x, y, map);
1259 // }
1260 //}
1261
1262 // Send LayerData in a spiral pattern. Fun!
1263 SendLayerTopRight(map, 0, 0, map.SizeX/Constants.TerrainPatchSize-1, map.SizeY/Constants.TerrainPatchSize-1);
1264=======
1265 for (int y = 0; y < 16; y++) 1246 for (int y = 0; y < 16; y++)
1266 { 1247 {
1267 for (int x = 0; x < 16; x++) 1248 for (int x = 0; x < 16; x++)
@@ -1269,7 +1250,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1269 SendLayerData(x, y, map); 1250 SendLayerData(x, y, map);
1270 } 1251 }
1271 } 1252 }
1272>>>>>>> avn/ubitvar
1273 } 1253 }
1274 catch (Exception e) 1254 catch (Exception e)
1275 { 1255 {
@@ -1277,74 +1257,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1277 } 1257 }
1278 } 1258 }
1279 1259
1280<<<<<<< HEAD
1281 private void SendLayerTopRight(TerrainData map, int x1, int y1, int x2, int y2)
1282=======
1283 // Legacy form of invocation that passes around a bare data array.
1284 // Just ignore what was passed and use the real terrain info that is part of the scene.
1285 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI,
1286 // there is a special form for specifying multiple terrain patches to send.
1287 // The form is to pass 'px' as negative the number of patches to send and to
1288 // pass the float array as pairs of patch X and Y coordinates. So, passing 'px'
1289 // as -2 and map= [3, 5, 8, 4] would mean to send two terrain heightmap patches
1290 // and the patches to send are <3,5> and <8,4>.
1291 public void SendLayerData(int px, int py, float[] map)
1292>>>>>>> avn/ubitvar
1293 {
1294 if (px >= 0)
1295 {
1296 SendLayerData(px, py, m_scene.Heightmap.GetTerrainData());
1297 }
1298 else
1299 {
1300 int numPatches = -px;
1301 int[] xPatches = new int[numPatches];
1302 int[] yPatches = new int[numPatches];
1303 for (int pp = 0; pp < numPatches; pp++)
1304 {
1305 xPatches[pp] = (int)map[pp * 2];
1306 yPatches[pp] = (int)map[pp * 2 + 1];
1307 }
1308
1309 // DebugSendingPatches("SendLayerData", xPatches, yPatches);
1310
1311<<<<<<< HEAD
1312 if (x2 - x1 > 0 && y2 - y1 > 0)
1313 SendLayerBottomLeft(map, x1, y1 + 1, x2 - 1, y2);
1314 }
1315
1316 void SendLayerBottomLeft(TerrainData map, int x1, int y1, int x2, int y2)
1317 {
1318 // Row in reverse
1319 for (int i = x2; i >= x1; i--)
1320 SendLayerData(i, y2, map);
1321
1322 // Column in reverse
1323 for (int j = y2 - 1; j >= y1; j--)
1324 SendLayerData(x1, j, map);
1325
1326 if (x2 - x1 > 0 && y2 - y1 > 0)
1327 SendLayerTopRight(map, x1 + 1, y1, x2, y2 - 1);
1328 }
1329
1330 /// <summary>
1331 /// Sends a set of four patches (x, x+1, ..., x+3) to the client
1332 /// </summary>
1333 /// <param name="map">heightmap</param>
1334 /// <param name="px">X coordinate for patches 0..12</param>
1335 /// <param name="py">Y coordinate for patches 0..15</param>
1336 // private void SendLayerPacket(float[] map, int y, int x)
1337 // {
1338 // int[] patches = new int[4];
1339 // patches[0] = x + 0 + y * 16;
1340 // patches[1] = x + 1 + y * 16;
1341 // patches[2] = x + 2 + y * 16;
1342 // patches[3] = x + 3 + y * 16;
1343
1344 // Packet layerpack = LLClientView.TerrainManager.CreateLandPacket(map, patches);
1345 // OutPacket(layerpack, ThrottleOutPacketType.Land);
1346 // }
1347
1348 // Legacy form of invocation that passes around a bare data array. 1260 // Legacy form of invocation that passes around a bare data array.
1349 // Just ignore what was passed and use the real terrain info that is part of the scene. 1261 // Just ignore what was passed and use the real terrain info that is part of the scene.
1350 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI, 1262 // As a HORRIBLE kludge in an attempt to not change the definition of IClientAPI,
@@ -1393,29 +1305,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1393 } 1305 }
1394 1306
1395 /// <summary> 1307 /// <summary>
1396=======
1397 SendLayerData(xPatches, yPatches, m_scene.Heightmap.GetTerrainData());
1398 }
1399 }
1400 1308
1401 private void DebugSendingPatches(string pWho, int[] pX, int[] pY)
1402 {
1403 if (m_log.IsDebugEnabled)
1404 {
1405 int numPatches = pX.Length;
1406 string Xs = "";
1407 string Ys = "";
1408 for (int pp = 0; pp < numPatches; pp++)
1409 {
1410 Xs += String.Format("{0}", (int)pX[pp]) + ",";
1411 Ys += String.Format("{0}", (int)pY[pp]) + ",";
1412 }
1413 m_log.DebugFormat("{0} {1}: numPatches={2}, X={3}, Y={4}", LogHeader, pWho, numPatches, Xs, Ys);
1414 }
1415 }
1416
1417 /// <summary>
1418>>>>>>> avn/ubitvar
1419 /// Sends a terrain packet for the point specified. 1309 /// Sends a terrain packet for the point specified.
1420 /// This is a legacy call that has refarbed the terrain into a flat map of floats. 1310 /// This is a legacy call that has refarbed the terrain into a flat map of floats.
1421 /// We just use the terrain from the region we know about. 1311 /// We just use the terrain from the region we know about.
@@ -1467,40 +1357,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1467 } 1357 }
1468 } 1358 }
1469 1359
1470<<<<<<< HEAD
1471 // When a user edits the terrain, so much data is sent, the data queues up fast and presents a
1472 // sub optimal editing experience. To alleviate this issue, when the user edits the terrain, we
1473 // start skipping the queues until they're done editing the terrain. We also make them
1474 // unreliable because it's extremely likely that multiple packets will be sent for a terrain patch
1475 // area invalidating previous packets for that area.
1476
1477 // It's possible for an editing user to flood themselves with edited packets but the majority
1478 // of use cases are such that only a tiny percentage of users will be editing the terrain.
1479 // Other, non-editing users will see the edits much slower.
1480
1481 // One last note on this topic, by the time users are going to be editing the terrain, it's
1482 // extremely likely that the sim will have rezzed already and therefore this is not likely going
1483 // to cause any additional issues with lost packets, objects or terrain patches.
1484
1485 // m_justEditedTerrain is volatile, so test once and duplicate two affected statements so we
1486 // only have one cache miss.
1487 private void SendTheLayerPacket(LayerDataPacket layerpack) 1360 private void SendTheLayerPacket(LayerDataPacket layerpack)
1488 { 1361 {
1489 if (m_justEditedTerrain)
1490 {
1491 layerpack.Header.Reliable = false;
1492 OutPacket(layerpack, ThrottleOutPacketType.Unknown );
1493 }
1494 else
1495 {
1496 layerpack.Header.Reliable = true;
1497 OutPacket(layerpack, ThrottleOutPacketType.Land);
1498 }
1499=======
1500 private void SendTheLayerPacket(LayerDataPacket layerpack)
1501 {
1502 OutPacket(layerpack, ThrottleOutPacketType.Land); 1362 OutPacket(layerpack, ThrottleOutPacketType.Land);
1503>>>>>>> avn/ubitvar
1504 } 1363 }
1505 1364
1506 /// <summary> 1365 /// <summary>
@@ -2490,15 +2349,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2490 { 2349 {
2491 if (agentid == AgentId) 2350 if (agentid == AgentId)
2492 { 2351 {
2493<<<<<<< HEAD
2494 ActiveGroupId = activegroupid; 2352 ActiveGroupId = activegroupid;
2495 ActiveGroupName = groupname; 2353 ActiveGroupName = groupname;
2496 ActiveGroupPowers = grouppowers; 2354 ActiveGroupPowers = grouppowers;
2497=======
2498 m_activeGroupID = activegroupid;
2499 m_activeGroupName = groupname;
2500 m_activeGroupPowers = grouppowers;
2501>>>>>>> avn/ubitvar
2502 } 2355 }
2503 2356
2504 AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); 2357 AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate);
@@ -3888,15 +3741,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3888 avp.Sender.IsTrial = false; 3741 avp.Sender.IsTrial = false;
3889 avp.Sender.ID = agentID; 3742 avp.Sender.ID = agentID;
3890 avp.AppearanceData = new AvatarAppearancePacket.AppearanceDataBlock[0]; 3743 avp.AppearanceData = new AvatarAppearancePacket.AppearanceDataBlock[0];
3891<<<<<<< HEAD
3892 avp.AppearanceHover = new AvatarAppearancePacket.AppearanceHoverBlock[0]; 3744 avp.AppearanceHover = new AvatarAppearancePacket.AppearanceHoverBlock[0];
3893=======
3894 3745
3895 // this need be use in future 3746// this need be use in future ?
3896 // avp.AppearanceData[0].AppearanceVersion = 0; 3747// avp.AppearanceData[0].AppearanceVersion = 0;
3897 // avp.AppearanceData[0].CofVersion = 0; 3748// avp.AppearanceData[0].CofVersion = 0;
3898 3749
3899>>>>>>> avn/ubitvar
3900 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); 3750 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
3901 OutPacket(avp, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); 3751 OutPacket(avp, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority);
3902 } 3752 }
@@ -4014,22 +3864,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4014 /// </summary> 3864 /// </summary>
4015 public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) 3865 public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
4016 { 3866 {
4017<<<<<<< HEAD
4018 if (entity.UUID == m_agentId && !updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) 3867 if (entity.UUID == m_agentId && !updateFlags.HasFlag(PrimUpdateFlags.FullUpdate))
4019 { 3868 {
4020 ImprovedTerseObjectUpdatePacket packet 3869 ImprovedTerseObjectUpdatePacket packet
4021 = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); 3870 = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
4022=======
4023 if (entity is SceneObjectPart)
4024 {
4025 SceneObjectPart e = (SceneObjectPart)entity;
4026 SceneObjectGroup g = e.ParentGroup;
4027 if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId)
4028 return; // Don't send updates for other people's HUDs
4029 }
4030
4031 uint priority = m_prioritizer.GetUpdatePriority(this, entity);
4032>>>>>>> avn/ubitvar
4033 3871
4034 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; 3872 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
4035 packet.RegionData.TimeDilation = Utils.FloatToUInt16(1, 0.0f, 1.0f); 3873 packet.RegionData.TimeDilation = Utils.FloatToUInt16(1, 0.0f, 1.0f);
@@ -4037,6 +3875,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4037 packet.ObjectData[0] = CreateImprovedTerseBlock(entity, false); 3875 packet.ObjectData[0] = CreateImprovedTerseBlock(entity, false);
4038 OutPacket(packet, ThrottleOutPacketType.Unknown, true); 3876 OutPacket(packet, ThrottleOutPacketType.Unknown, true);
4039 } 3877 }
3878
3879 else if (entity is SceneObjectPart)
3880 {
3881 SceneObjectPart e = (SceneObjectPart)entity;
3882 SceneObjectGroup g = e.ParentGroup;
3883 if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId)
3884 return; // Don't send updates for other people's HUDs
3885 }
3886
4040 else 3887 else
4041 { 3888 {
4042 //double priority = m_prioritizer.GetUpdatePriority(this, entity); 3889 //double priority = m_prioritizer.GetUpdatePriority(this, entity);
@@ -4385,15 +4232,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4385 4232
4386 OutPacket(packet, ThrottleOutPacketType.Task, true); 4233 OutPacket(packet, ThrottleOutPacketType.Task, true);
4387 } 4234 }
4388<<<<<<< HEAD
4389 4235
4390// m_log.DebugFormat( 4236// m_log.DebugFormat(
4391// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}", 4237// "[LLCLIENTVIEW]: Sent {0} updates in ProcessEntityUpdates() for {1} {2} in {3}",
4392// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); 4238// updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name);
4393// 4239//
4394 #endregion Packet Sending
4395=======
4396>>>>>>> avn/ubitvar
4397 } 4240 }
4398 4241
4399 public void ReprioritizeUpdates() 4242 public void ReprioritizeUpdates()
@@ -5360,11 +5203,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5360 { 5203 {
5361 ScenePresence presence = (ScenePresence)entity; 5204 ScenePresence presence = (ScenePresence)entity;
5362 5205
5363<<<<<<< HEAD
5364// m_log.DebugFormat(
5365// "[LLCLIENTVIEW]: Sending terse update to {0} with pos {1}, vel {2} in {3}",
5366// Name, presence.OffsetPosition, presence.Velocity, m_scene.Name);
5367=======
5368 position = presence.OffsetPosition; 5206 position = presence.OffsetPosition;
5369 rotation = presence.Rotation; 5207 rotation = presence.Rotation;
5370 angularVelocity = presence.AngularVelocity; 5208 angularVelocity = presence.AngularVelocity;
@@ -5373,7 +5211,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5373 attachPoint = 0; 5211 attachPoint = 0;
5374// m_log.DebugFormat( 5212// m_log.DebugFormat(
5375// "[LLCLIENTVIEW]: Sending terse update to {0} with position {1} in {2}", Name, presence.OffsetPosition, m_scene.Name); 5213// "[LLCLIENTVIEW]: Sending terse update to {0} with position {1} in {2}", Name, presence.OffsetPosition, m_scene.Name);
5376>>>>>>> avn/ubitvar
5377 5214
5378 // attachPoint = presence.State; // Core: commented 5215 // attachPoint = presence.State; // Core: commented
5379 collisionPlane = presence.CollisionPlane; 5216 collisionPlane = presence.CollisionPlane;
@@ -5495,24 +5332,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5495// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name); 5332// "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name);
5496 5333
5497 byte[] objectData = new byte[76]; 5334 byte[] objectData = new byte[76];
5498<<<<<<< HEAD
5499
5500 data.CollisionPlane.ToBytes(objectData, 0);
5501 data.OffsetPosition.ToBytes(objectData, 16);
5502 data.Velocity.ToBytes(objectData, 28);
5503// data.Acceleration.ToBytes(objectData, 40);
5504
5505 // Whilst not in mouselook, an avatar will transmit only the Z rotation as this is the only axis
5506 // it rotates around.
5507 // In mouselook, X and Y co-ordinate will also be sent but when used in Rotation, these cause unwanted
5508 // excessive up and down movements of the camera when looking up and down.
5509 // See http://opensimulator.org/mantis/view.php?id=3274
5510 // This does not affect head movement, since this is controlled entirely by camera movement rather than
5511 // body rotation. We still need to transmit X and Y for sitting avatars but mouselook does not change
5512 // the rotation in this case.
5513 Quaternion rot = data.Rotation;
5514=======
5515>>>>>>> avn/ubitvar
5516 5335
5517 Vector3 velocity = new Vector3(0, 0, 0); 5336 Vector3 velocity = new Vector3(0, 0, 0);
5518 Vector3 acceleration = new Vector3(0, 0, 0); 5337 Vector3 acceleration = new Vector3(0, 0, 0);
@@ -5596,11 +5415,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5596 //update.JointType = 0; 5415 //update.JointType = 0;
5597 update.Material = data.Material; 5416 update.Material = data.Material;
5598 update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim 5417 update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
5599<<<<<<< HEAD
5600
5601=======
5602/* 5418/*
5603>>>>>>> avn/ubitvar
5604 if (data.ParentGroup.IsAttachment) 5419 if (data.ParentGroup.IsAttachment)
5605 { 5420 {
5606 update.NameValue 5421 update.NameValue
@@ -5625,7 +5440,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5625 // case for attachments may contain conflicting values that can end up crashing the viewer. 5440 // case for attachments may contain conflicting values that can end up crashing the viewer.
5626 update.State = data.ParentGroup.RootPart.Shape.State; 5441 update.State = data.ParentGroup.RootPart.Shape.State;
5627 } 5442 }
5628 */ 5443*/
5629 5444
5630 if (data.ParentGroup.IsAttachment) 5445 if (data.ParentGroup.IsAttachment)
5631 { 5446 {
@@ -9365,11 +9180,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9365 if ((locX >= m_scene.RegionInfo.WorldLocX) 9180 if ((locX >= m_scene.RegionInfo.WorldLocX)
9366 && (locX < (m_scene.RegionInfo.WorldLocX + m_scene.RegionInfo.RegionSizeX)) 9181 && (locX < (m_scene.RegionInfo.WorldLocX + m_scene.RegionInfo.RegionSizeX))
9367 && (locY >= m_scene.RegionInfo.WorldLocY) 9182 && (locY >= m_scene.RegionInfo.WorldLocY)
9368<<<<<<< HEAD
9369 && (locY < (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY)) )
9370=======
9371 && (locY < (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY))) 9183 && (locY < (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY)))
9372>>>>>>> avn/ubitvar
9373 { 9184 {
9374 tpLocReq.Info.RegionHandle = m_scene.RegionInfo.RegionHandle; 9185 tpLocReq.Info.RegionHandle = m_scene.RegionInfo.RegionHandle;
9375 tpLocReq.Info.Position.X += locX - m_scene.RegionInfo.WorldLocX; 9186 tpLocReq.Info.Position.X += locX - m_scene.RegionInfo.WorldLocX;
@@ -12285,7 +12096,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12285 /// <param name="packet"></param> 12096 /// <param name="packet"></param>
12286 /// <returns></returns> 12097 /// <returns></returns>
12287 // TODO: Convert old handler to use new method 12098 // TODO: Convert old handler to use new method
12288 /*protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet) 12099/*
12100 protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet)
12289 { 12101 {
12290 AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet; 12102 AgentCachedTexturePacket cachedtex = (AgentCachedTexturePacket)packet;
12291 AgentCachedTextureResponsePacket cachedresp = (AgentCachedTextureResponsePacket)PacketPool.Instance.GetPacket(PacketType.AgentCachedTextureResponse); 12103 AgentCachedTextureResponsePacket cachedresp = (AgentCachedTextureResponsePacket)PacketPool.Instance.GetPacket(PacketType.AgentCachedTextureResponse);
@@ -12340,27 +12152,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12340 } 12152 }
12341 } 12153 }
12342 12154
12343<<<<<<< HEAD
12344 if (cacheItems != null)
12345 {
12346 // We need to make sure the asset stored in the bake is available on this server also by its assetid before we map it to a Cacheid.
12347 // Copy the baked textures to the sim's assets cache (local only).
12348 foreach (WearableCacheItem item in cacheItems)
12349 {
12350 if (cache.GetCached(item.TextureID.ToString()) == null)
12351 {
12352 item.TextureAsset.Temporary = true;
12353 item.TextureAsset.Local = true;
12354 cache.Store(item.TextureAsset);
12355 }
12356 }
12357
12358 // Return the cached textures
12359 for (int i = 0; i < maxWearablesLoop; i++)
12360 {
12361 WearableCacheItem item =
12362 WearableCacheItem.SearchTextureIndex(cachedtex.WearableData[i].TextureIndex, cacheItems);
12363=======
12364 CachedTextureRequest handlerCachedTextureRequest = OnCachedTextureRequest; 12155 CachedTextureRequest handlerCachedTextureRequest = OnCachedTextureRequest;
12365 if (handlerCachedTextureRequest != null) 12156 if (handlerCachedTextureRequest != null)
12366 { 12157 {
@@ -12368,7 +12159,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12368 } 12159 }
12369 12160
12370 return true; 12161 return true;
12371 }*/ 12162 }
12163*/
12372 12164
12373 protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet) 12165 protected bool HandleAgentTextureCached(IClientAPI simclient, Packet packet)
12374 { 12166 {
@@ -12408,21 +12200,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12408 for (int i = 0; i < maxWearablesLoop; i++) 12200 for (int i = 0; i < maxWearablesLoop; i++)
12409 { 12201 {
12410 int idx = cachedtex.WearableData[i].TextureIndex; 12202 int idx = cachedtex.WearableData[i].TextureIndex;
12411>>>>>>> avn/ubitvar
12412
12413 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); 12203 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
12414 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex; 12204 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
12415 cachedresp.WearableData[i].HostName = new byte[0]; 12205 cachedresp.WearableData[i].HostName = new byte[0];
12416<<<<<<< HEAD
12417 if (item != null && cachedtex.WearableData[i].ID == item.CacheId)
12418 {
12419 cachedresp.WearableData[i].TextureID = item.TextureID;
12420=======
12421 if (cachedtex.WearableData[i].ID == cacheItems[idx].CacheId) 12206 if (cachedtex.WearableData[i].ID == cacheItems[idx].CacheId)
12422 { 12207 {
12423 cachedresp.WearableData[i].TextureID = cacheItems[idx].TextureID; 12208 cachedresp.WearableData[i].TextureID = cacheItems[idx].TextureID;
12424 cacheHits++; 12209 cacheHits++;
12425>>>>>>> avn/ubitvar
12426 } 12210 }
12427 else 12211 else
12428 { 12212 {
@@ -12432,29 +12216,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP
12432 } 12216 }
12433 else 12217 else
12434 { 12218 {
12435<<<<<<< HEAD
12436 // Cached textures not available
12437=======
12438>>>>>>> avn/ubitvar
12439 for (int i = 0; i < maxWearablesLoop; i++) 12219 for (int i = 0; i < maxWearablesLoop; i++)
12440 { 12220 {
12441 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); 12221 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
12442 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex; 12222 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
12443 cachedresp.WearableData[i].TextureID = UUID.Zero; 12223 cachedresp.WearableData[i].TextureID = UUID.Zero;
12444<<<<<<< HEAD
12445 cachedresp.WearableData[i].HostName = new byte[0];
12446 }
12447 }
12448
12449=======
12450 //UUID.Parse("8334fb6e-c2f5-46ee-807d-a435f61a8d46");
12451 cachedresp.WearableData[i].HostName = new byte[0]; 12224 cachedresp.WearableData[i].HostName = new byte[0];
12452 } 12225 }
12453 } 12226 }
12454 12227
12455 m_log.DebugFormat("texture cached: hits {0}", cacheHits); 12228 m_log.DebugFormat("texture cached: hits {0}", cacheHits);
12456 12229
12457>>>>>>> avn/ubitvar
12458 cachedresp.Header.Zerocoded = true; 12230 cachedresp.Header.Zerocoded = true;
12459 OutPacket(cachedresp, ThrottleOutPacketType.Task); 12231 OutPacket(cachedresp, ThrottleOutPacketType.Task);
12460 12232