aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs87
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs34
-rw-r--r--OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs4
-rw-r--r--OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs6
-rw-r--r--OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs19
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs27
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs2
8 files changed, 139 insertions, 42 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 4860da0..d18b026 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -460,6 +460,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
460 } 460 }
461 461
462 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } 462 public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } }
463
463 464
464 #endregion Properties 465 #endregion Properties
465 466
@@ -585,6 +586,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
585 // Disable UDP handling for this client 586 // Disable UDP handling for this client
586 m_udpClient.Shutdown(); 587 m_udpClient.Shutdown();
587 588
589
588 //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false)); 590 //m_log.InfoFormat("[CLIENTVIEW] Memory pre GC {0}", System.GC.GetTotalMemory(false));
589 //GC.Collect(); 591 //GC.Collect();
590 //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true)); 592 //m_log.InfoFormat("[CLIENTVIEW] Memory post GC {0}", System.GC.GetTotalMemory(true));
@@ -2750,8 +2752,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2750 req.AssetInf.ID, req.AssetInf.Metadata.ContentType); 2752 req.AssetInf.ID, req.AssetInf.Metadata.ContentType);
2751 return; 2753 return;
2752 } 2754 }
2755 int WearableOut = 0;
2756 bool isWearable = false;
2757
2758 if (req.AssetInf != null)
2759 isWearable =
2760 ((AssetType) req.AssetInf.Type ==
2761 AssetType.Bodypart || (AssetType) req.AssetInf.Type == AssetType.Clothing);
2753 2762
2754 //m_log.Debug("sending asset " + req.RequestAssetID); 2763
2764 //m_log.Debug("sending asset " + req.RequestAssetID + ", iswearable: " + isWearable);
2765
2766
2767 //if (isWearable)
2768 // m_log.Debug((AssetType)req.AssetInf.Type);
2769
2755 TransferInfoPacket Transfer = new TransferInfoPacket(); 2770 TransferInfoPacket Transfer = new TransferInfoPacket();
2756 Transfer.TransferInfo.ChannelType = 2; 2771 Transfer.TransferInfo.ChannelType = 2;
2757 Transfer.TransferInfo.Status = 0; 2772 Transfer.TransferInfo.Status = 0;
@@ -2773,7 +2788,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2773 Transfer.TransferInfo.Size = req.AssetInf.Data.Length; 2788 Transfer.TransferInfo.Size = req.AssetInf.Data.Length;
2774 Transfer.TransferInfo.TransferID = req.TransferRequestID; 2789 Transfer.TransferInfo.TransferID = req.TransferRequestID;
2775 Transfer.Header.Zerocoded = true; 2790 Transfer.Header.Zerocoded = true;
2776 OutPacket(Transfer, ThrottleOutPacketType.Asset); 2791 OutPacket(Transfer, isWearable ? ThrottleOutPacketType.State : ThrottleOutPacketType.Asset);
2777 2792
2778 if (req.NumPackets == 1) 2793 if (req.NumPackets == 1)
2779 { 2794 {
@@ -2784,7 +2799,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2784 TransferPacket.TransferData.Data = req.AssetInf.Data; 2799 TransferPacket.TransferData.Data = req.AssetInf.Data;
2785 TransferPacket.TransferData.Status = 1; 2800 TransferPacket.TransferData.Status = 1;
2786 TransferPacket.Header.Zerocoded = true; 2801 TransferPacket.Header.Zerocoded = true;
2787 OutPacket(TransferPacket, ThrottleOutPacketType.Asset); 2802 OutPacket(TransferPacket, isWearable ? ThrottleOutPacketType.State : ThrottleOutPacketType.Asset);
2788 } 2803 }
2789 else 2804 else
2790 { 2805 {
@@ -2817,7 +2832,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2817 TransferPacket.TransferData.Status = 1; 2832 TransferPacket.TransferData.Status = 1;
2818 } 2833 }
2819 TransferPacket.Header.Zerocoded = true; 2834 TransferPacket.Header.Zerocoded = true;
2820 OutPacket(TransferPacket, ThrottleOutPacketType.Asset); 2835 OutPacket(TransferPacket, isWearable ? ThrottleOutPacketType.State : ThrottleOutPacketType.Asset);
2821 2836
2822 processedLength += chunkSize; 2837 processedLength += chunkSize;
2823 packetNumber++; 2838 packetNumber++;
@@ -3572,24 +3587,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3572 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; 3587 aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
3573 AgentWearablesUpdatePacket.WearableDataBlock awb; 3588 AgentWearablesUpdatePacket.WearableDataBlock awb;
3574 int idx = 0; 3589 int idx = 0;
3575 for (int i = 0; i < wearables.Length; i++) 3590
3576 { 3591 for (int i = 0; i < wearables.Length; i++)
3577 for (int j = 0; j < wearables[i].Count; j++) 3592 {
3578 { 3593 for (int j = 0; j < wearables[i].Count; j++)
3579 awb = new AgentWearablesUpdatePacket.WearableDataBlock(); 3594 {
3580 awb.WearableType = (byte)i; 3595 awb = new AgentWearablesUpdatePacket.WearableDataBlock();
3581 awb.AssetID = wearables[i][j].AssetID; 3596 awb.WearableType = (byte) i;
3582 awb.ItemID = wearables[i][j].ItemID; 3597 awb.AssetID = wearables[i][j].AssetID;
3583 aw.WearableData[idx] = awb; 3598 awb.ItemID = wearables[i][j].ItemID;
3584 idx++; 3599 aw.WearableData[idx] = awb;
3585 3600 idx++;
3586// m_log.DebugFormat( 3601
3587// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", 3602 // m_log.DebugFormat(
3588// awb.ItemID, awb.AssetID, i, Name); 3603 // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
3589 } 3604 // awb.ItemID, awb.AssetID, i, Name);
3590 } 3605 }
3606 }
3591 3607
3592 OutPacket(aw, ThrottleOutPacketType.Task); 3608 OutPacket(aw, ThrottleOutPacketType.State);
3593 } 3609 }
3594 3610
3595 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) 3611 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
@@ -3614,7 +3630,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3614 avp.Sender.IsTrial = false; 3630 avp.Sender.IsTrial = false;
3615 avp.Sender.ID = agentID; 3631 avp.Sender.ID = agentID;
3616 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString()); 3632 //m_log.DebugFormat("[CLIENT]: Sending appearance for {0} to {1}", agentID.ToString(), AgentId.ToString());
3617 OutPacket(avp, ThrottleOutPacketType.Task); 3633 OutPacket(avp, ThrottleOutPacketType.State);
3618 } 3634 }
3619 3635
3620 public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) 3636 public void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
@@ -6282,12 +6298,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6282 byte[] visualparams = new byte[appear.VisualParam.Length]; 6298 byte[] visualparams = new byte[appear.VisualParam.Length];
6283 for (int i = 0; i < appear.VisualParam.Length; i++) 6299 for (int i = 0; i < appear.VisualParam.Length; i++)
6284 visualparams[i] = appear.VisualParam[i].ParamValue; 6300 visualparams[i] = appear.VisualParam[i].ParamValue;
6285 6301 //var b = appear.WearableData[0];
6302
6286 Primitive.TextureEntry te = null; 6303 Primitive.TextureEntry te = null;
6287 if (appear.ObjectData.TextureEntry.Length > 1) 6304 if (appear.ObjectData.TextureEntry.Length > 1)
6288 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length); 6305 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
6306
6307 WearableCacheItem[] cacheitems = new WearableCacheItem[appear.WearableData.Length];
6308 for (int i=0; i<appear.WearableData.Length;i++)
6309 cacheitems[i] = new WearableCacheItem(){CacheId = appear.WearableData[i].CacheID,TextureIndex=Convert.ToUInt32(appear.WearableData[i].TextureIndex)};
6310
6311
6289 6312
6290 handlerSetAppearance(sender, te, visualparams,avSize); 6313 handlerSetAppearance(sender, te, visualparams,avSize, cacheitems);
6291 } 6314 }
6292 catch (Exception e) 6315 catch (Exception e)
6293 { 6316 {
@@ -7798,6 +7821,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7798 // surrounding scene 7821 // surrounding scene
7799 if ((ImageType)block.Type == ImageType.Baked) 7822 if ((ImageType)block.Type == ImageType.Baked)
7800 args.Priority *= 2.0f; 7823 args.Priority *= 2.0f;
7824 int wearableout = 0;
7801 7825
7802 ImageManager.EnqueueReq(args); 7826 ImageManager.EnqueueReq(args);
7803 } 7827 }
@@ -11687,6 +11711,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11687 11711
11688 if (cachedtex.AgentData.SessionID != SessionId) 11712 if (cachedtex.AgentData.SessionID != SessionId)
11689 return false; 11713 return false;
11714
11690 11715
11691 // TODO: don't create new blocks if recycling an old packet 11716 // TODO: don't create new blocks if recycling an old packet
11692 cachedresp.AgentData.AgentID = AgentId; 11717 cachedresp.AgentData.AgentID = AgentId;
@@ -11696,6 +11721,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11696 cachedresp.WearableData = 11721 cachedresp.WearableData =
11697 new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length]; 11722 new AgentCachedTextureResponsePacket.WearableDataBlock[cachedtex.WearableData.Length];
11698 11723
11724 //IAvatarFactoryModule fac = m_scene.RequestModuleInterface<IAvatarFactoryModule>();
11725 // var item = fac.GetBakedTextureFaces(AgentId);
11726 //WearableCacheItem[] items = fac.GetCachedItems(AgentId);
11727
11699 IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); 11728 IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
11700 if (cache == null) 11729 if (cache == null)
11701 { 11730 {
@@ -11703,7 +11732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11703 { 11732 {
11704 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); 11733 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
11705 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex; 11734 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
11706 cachedresp.WearableData[i].TextureID = UUID.Zero; 11735 cachedresp.WearableData[i].TextureID = UUID.Zero; //UUID.Parse("8334fb6e-c2f5-46ee-807d-a435f61a8d46");
11707 cachedresp.WearableData[i].HostName = new byte[0]; 11736 cachedresp.WearableData[i].HostName = new byte[0];
11708 } 11737 }
11709 } 11738 }
@@ -11713,10 +11742,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11713 { 11742 {
11714 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); 11743 cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock();
11715 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex; 11744 cachedresp.WearableData[i].TextureIndex = cachedtex.WearableData[i].TextureIndex;
11716 if(cache.Check(cachedtex.WearableData[i].ID.ToString())) 11745
11746
11747
11748 if (cache.Check(cachedtex.WearableData[i].ID.ToString()))
11717 cachedresp.WearableData[i].TextureID = UUID.Zero; 11749 cachedresp.WearableData[i].TextureID = UUID.Zero;
11750 //UUID.Parse("8334fb6e-c2f5-46ee-807d-a435f61a8d46");
11718 else 11751 else
11719 cachedresp.WearableData[i].TextureID = UUID.Zero; 11752 cachedresp.WearableData[i].TextureID = UUID.Zero; // UUID.Parse("8334fb6e-c2f5-46ee-807d-a435f61a8d46");
11720 cachedresp.WearableData[i].HostName = new byte[0]; 11753 cachedresp.WearableData[i].HostName = new byte[0];
11721 } 11754 }
11722 } 11755 }
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 3532b1d..3080023 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -140,18 +140,18 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
140 /// <param name="sp"></param> 140 /// <param name="sp"></param>
141 /// <param name="texture"></param> 141 /// <param name="texture"></param>
142 /// <param name="visualParam"></param> 142 /// <param name="visualParam"></param>
143 public void SetAppearance(IScenePresence sp, AvatarAppearance appearance) 143 public void SetAppearance(IScenePresence sp, AvatarAppearance appearance, WearableCacheItem[] cacheItems)
144 { 144 {
145 SetAppearance(sp, appearance.Texture, appearance.VisualParams); 145 SetAppearance(sp, appearance.Texture, appearance.VisualParams, cacheItems);
146 } 146 }
147 147
148 148
149 public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize) 149 public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize, WearableCacheItem[] cacheItems)
150 { 150 {
151 float oldoff = sp.Appearance.AvatarFeetOffset; 151 float oldoff = sp.Appearance.AvatarFeetOffset;
152 Vector3 oldbox = sp.Appearance.AvatarBoxSize; 152 Vector3 oldbox = sp.Appearance.AvatarBoxSize;
153 153
154 SetAppearance(sp, textureEntry, visualParams); 154 SetAppearance(sp, textureEntry, visualParams, cacheItems);
155 sp.Appearance.SetSize(avSize); 155 sp.Appearance.SetSize(avSize);
156 156
157 float off = sp.Appearance.AvatarFeetOffset; 157 float off = sp.Appearance.AvatarFeetOffset;
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
166 /// <param name="sp"></param> 166 /// <param name="sp"></param>
167 /// <param name="texture"></param> 167 /// <param name="texture"></param>
168 /// <param name="visualParam"></param> 168 /// <param name="visualParam"></param>
169 public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams) 169 public void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, WearableCacheItem[] cacheItems)
170 { 170 {
171// m_log.DebugFormat( 171// m_log.DebugFormat(
172// "[AVFACTORY]: start SetAppearance for {0}, te {1}, visualParams {2}", 172// "[AVFACTORY]: start SetAppearance for {0}, te {1}, visualParams {2}",
@@ -205,11 +205,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
205// ((ScenePresence)sp).SetSize(box,off); 205// ((ScenePresence)sp).SetSize(box,off);
206 206
207 } 207 }
208 208 //if (cacheItems.Length > 0)
209 //{
210 sp.Appearance.WearableCacheItems = cacheItems;
211 //}
209 // Process the baked texture array 212 // Process the baked texture array
210 if (textureEntry != null) 213 if (textureEntry != null)
211 { 214 {
212// m_log.DebugFormat("[AVFACTORY]: Received texture update for {0} {1}", sp.Name, sp.UUID); 215 m_log.DebugFormat("[AVFACTORY]: Received texture update for {0} {1}", sp.Name, sp.UUID);
213 216
214// WriteBakedTexturesReport(sp, m_log.DebugFormat); 217// WriteBakedTexturesReport(sp, m_log.DebugFormat);
215 218
@@ -278,6 +281,19 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
278 return GetBakedTextureFaces(sp); 281 return GetBakedTextureFaces(sp);
279 } 282 }
280 283
284 public WearableCacheItem[] GetCachedItems(UUID agentId)
285 {
286 ScenePresence sp = m_scene.GetScenePresence(agentId);
287 Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = GetBakedTextureFaces(sp);
288
289 WearableCacheItem[] items = sp.Appearance.WearableCacheItems;
290 //foreach (WearableCacheItem item in items)
291 //{
292
293 //}
294 return items;
295 }
296
281 public bool SaveBakedTextures(UUID agentId) 297 public bool SaveBakedTextures(UUID agentId)
282 { 298 {
283 ScenePresence sp = m_scene.GetScenePresence(agentId); 299 ScenePresence sp = m_scene.GetScenePresence(agentId);
@@ -660,12 +676,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
660 /// <param name="client"></param> 676 /// <param name="client"></param>
661 /// <param name="texture"></param> 677 /// <param name="texture"></param>
662 /// <param name="visualParam"></param> 678 /// <param name="visualParam"></param>
663 private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize) 679 private void Client_OnSetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams, Vector3 avSize, WearableCacheItem[] cacheItems)
664 { 680 {
665 // m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance called for {0} ({1})", client.Name, client.AgentId); 681 // m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance called for {0} ({1})", client.Name, client.AgentId);
666 ScenePresence sp = m_scene.GetScenePresence(client.AgentId); 682 ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
667 if (sp != null) 683 if (sp != null)
668 SetAppearance(sp, textureEntry, visualParams,avSize); 684 SetAppearance(sp, textureEntry, visualParams,avSize, cacheItems);
669 else 685 else
670 m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance unable to find presence for {0}", client.AgentId); 686 m_log.WarnFormat("[AVFACTORY]: Client_OnSetAppearance unable to find presence for {0}", client.AgentId);
671 } 687 }
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
index 848b3bf..e21547c 100644
--- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/Tests/AvatarFactoryModuleTests.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
61 for (byte i = 0; i < visualParams.Length; i++) 61 for (byte i = 0; i < visualParams.Length; i++)
62 visualParams[i] = i; 62 visualParams[i] = i;
63 63
64 afm.SetAppearance(sp, new Primitive.TextureEntry(TestHelpers.ParseTail(0x10)), visualParams); 64 afm.SetAppearance(sp, new Primitive.TextureEntry(TestHelpers.ParseTail(0x10)), visualParams, new WearableCacheItem[0]);
65 65
66 // TODO: Check baked texture 66 // TODO: Check baked texture
67 Assert.AreEqual(visualParams, sp.Appearance.VisualParams); 67 Assert.AreEqual(visualParams, sp.Appearance.VisualParams);
@@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
102 Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex); 102 Primitive.TextureEntryFace eyesFace = bakedTextureEntry.CreateFace(eyesFaceIndex);
103 eyesFace.TextureID = eyesTextureId; 103 eyesFace.TextureID = eyesTextureId;
104 104
105 afm.SetAppearance(sp, bakedTextureEntry, visualParams); 105 afm.SetAppearance(sp, bakedTextureEntry, visualParams, new WearableCacheItem[0]);
106 afm.SaveBakedTextures(userId); 106 afm.SaveBakedTextures(userId);
107// Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId); 107// Dictionary<BakeType, Primitive.TextureEntryFace> bakedTextures = afm.GetBakedTextureFaces(userId);
108 108
diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs
index 34aca33..d25c930 100644
--- a/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactoryModule.cs
@@ -35,8 +35,8 @@ namespace OpenSim.Region.Framework.Interfaces
35 35
36 public interface IAvatarFactoryModule 36 public interface IAvatarFactoryModule
37 { 37 {
38 void SetAppearance(IScenePresence sp, AvatarAppearance appearance); 38 void SetAppearance(IScenePresence sp, AvatarAppearance appearance, WearableCacheItem[] cacheItems);
39 void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams); 39 void SetAppearance(IScenePresence sp, Primitive.TextureEntry textureEntry, byte[] visualParams, WearableCacheItem[] cacheItems);
40 40
41 /// <summary> 41 /// <summary>
42 /// Send the appearance of an avatar to others in the scene. 42 /// Send the appearance of an avatar to others in the scene.
@@ -52,6 +52,8 @@ namespace OpenSim.Region.Framework.Interfaces
52 /// <returns>An empty list if this agent has no baked textures (e.g. because it's a child agent)</returns> 52 /// <returns>An empty list if this agent has no baked textures (e.g. because it's a child agent)</returns>
53 Dictionary<BakeType, Primitive.TextureEntryFace> GetBakedTextureFaces(UUID agentId); 53 Dictionary<BakeType, Primitive.TextureEntryFace> GetBakedTextureFaces(UUID agentId);
54 54
55
56 WearableCacheItem[] GetCachedItems(UUID agentId);
55 /// <summary> 57 /// <summary>
56 /// Save the baked textures for the given agent permanently in the asset database. 58 /// Save the baked textures for the given agent permanently in the asset database.
57 /// </summary> 59 /// </summary>
diff --git a/OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs b/OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs
new file mode 100644
index 0000000..d63898a
--- /dev/null
+++ b/OpenSim/Region/Framework/Interfaces/IBakedTextureModule.cs
@@ -0,0 +1,19 @@
1////////////////////////////////////////////////////////////////
2//
3// (c) 2009, 2010 Careminster Limited and Melanie Thielker
4//
5// All rights reserved
6//
7using System;
8using Nini.Config;
9using OpenSim.Framework;
10using OpenMetaverse;
11
12namespace OpenSim.Services.Interfaces
13{
14 public interface IBakedTextureModule
15 {
16 AssetBase[] Get(UUID id);
17 void Store(UUID id, AssetBase[] data);
18 }
19}
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 646e0e2..85f4ee5 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -925,6 +925,33 @@ namespace OpenSim.Region.Framework.Scenes
925 925
926 m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene); 926 m_scene.EventManager.TriggerSetRootAgentScene(m_uuid, m_scene);
927 927
928 UUID groupUUID = UUID.Zero;
929 string GroupName = string.Empty;
930 ulong groupPowers = 0;
931
932 // ----------------------------------
933 // Previous Agent Difference - AGNI sends an unsolicited AgentDataUpdate upon root agent status
934 try
935 {
936 if (gm != null)
937 {
938 groupUUID = ControllingClient.ActiveGroupId;
939 GroupRecord record = gm.GetGroupRecord(groupUUID);
940 if (record != null)
941 GroupName = record.GroupName;
942 GroupMembershipData groupMembershipData = gm.GetMembershipData(groupUUID, m_uuid);
943 if (groupMembershipData != null)
944 groupPowers = groupMembershipData.GroupPowers;
945 }
946 ControllingClient.SendAgentDataUpdate(m_uuid, groupUUID, Firstname, Lastname, groupPowers, GroupName,
947 Grouptitle);
948 }
949 catch (Exception e)
950 {
951 m_log.Debug("[AGENTUPDATE]: " + e.ToString());
952 }
953 // ------------------------------------
954
928 if (ParentID == 0) 955 if (ParentID == 0)
929 { 956 {
930 // Moved this from SendInitialData to ensure that Appearance is initialized 957 // Moved this from SendInitialData to ensure that Appearance is initialized
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 1b4ed1e..5ac4e27 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -911,7 +911,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
911 // Mimicking LLClientView which gets always set appearance from client. 911 // Mimicking LLClientView which gets always set appearance from client.
912 AvatarAppearance appearance; 912 AvatarAppearance appearance;
913 m_scene.GetAvatarAppearance(this, out appearance); 913 m_scene.GetAvatarAppearance(this, out appearance);
914 OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(),appearance.AvatarSize); 914 OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(),appearance.AvatarSize, new WearableCacheItem[0]);
915 } 915 }
916 916
917 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) 917 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index 52ed846..ef4005b 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -108,7 +108,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
108 // ScenePresence.SendInitialData() to reset our entire appearance. 108 // ScenePresence.SendInitialData() to reset our entire appearance.
109 m_scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId)); 109 m_scene.AssetService.Store(AssetHelpers.CreateNotecardAsset(originalFace8TextureId));
110 110
111 m_afMod.SetAppearance(sp, originalTe, null); 111 m_afMod.SetAppearance(sp, originalTe, null, new WearableCacheItem[0] );
112 112
113 UUID npcId = m_npcMod.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, sp.Appearance); 113 UUID npcId = m_npcMod.CreateNPC("John", "Smith", new Vector3(128, 128, 30), UUID.Zero, true, m_scene, sp.Appearance);
114 114