From cf182b98970a684ba57eed590db17a039d66158b Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 30 Mar 2007 12:12:33 +0000 Subject: Clothing now seems to work (though there are likely to still be some problems) --- OpenSim.RegionServer/AgentAssetUpload.cs | 6 ++++-- OpenSim.RegionServer/SimClient.cs | 22 +++++++++++++++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) (limited to 'OpenSim.RegionServer') diff --git a/OpenSim.RegionServer/AgentAssetUpload.cs b/OpenSim.RegionServer/AgentAssetUpload.cs index f6b388d..722da53 100644 --- a/OpenSim.RegionServer/AgentAssetUpload.cs +++ b/OpenSim.RegionServer/AgentAssetUpload.cs @@ -41,6 +41,7 @@ namespace OpenSim response.AssetBlock.Success = true; response.AssetBlock.UUID = transactionID.Combine(this.ourClient.SecureSessionID); this.ourClient.OutPacket(response); + m_assetCache.AddAsset(asset); } else { @@ -150,10 +151,11 @@ namespace OpenSim response.AssetBlock.UUID = trans.TransactionID.Combine(this.ourClient.SecureSessionID); this.ourClient.OutPacket(response); + m_assetCache.AddAsset(trans.Asset); //check if we should add it to inventory if (trans.AddToInventory) { - m_assetCache.AddAsset(trans.Asset); + // m_assetCache.AddAsset(trans.Asset); m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); } @@ -201,7 +203,7 @@ namespace OpenSim if (trans.UploadComplete) { //already complete so we can add it to the inventory - m_assetCache.AddAsset(trans.Asset); + //m_assetCache.AddAsset(trans.Asset); Console.WriteLine( "Item created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); } else diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 0985447..6ea9e6e 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs @@ -69,7 +69,7 @@ namespace OpenSim private const int MAX_SEQUENCE = 0xFFFFFF; private AgentAssetUpload UploadAssets; private LLUUID newAssetFolder = LLUUID.Zero; - private bool debug = false; + private bool debug = true;//false; private World m_world; private Dictionary m_clientThreads; private AssetCache m_assetCache; @@ -78,6 +78,7 @@ namespace OpenSim private OpenSimNetworkHandler m_application; private InventoryCache m_inventoryCache; private bool m_sandboxMode; + private int cachedtextureserial = 0; public IUserServer UserServer @@ -149,6 +150,25 @@ namespace OpenSim // Console.WriteLine(appear.ToString()); this.ClientAvatar.SetAppearance(appear); break; + case PacketType.AgentCachedTexture: + Console.WriteLine(Pack.ToString()); + AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)Pack; + AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket(); + cachedresp.AgentData.AgentID = this.AgentID; + cachedresp.AgentData.SessionID = this.SessionID; + cachedresp.AgentData.SerialNum = this.cachedtextureserial; + this.cachedtextureserial++; + cachedresp.WearableData = new AgentCachedTextureResponsePacket.WearableDataBlock[chechedtex.WearableData.Length]; + for (int i = 0; i < chechedtex.WearableData.Length; i++) + { + cachedresp.WearableData[i] = new AgentCachedTextureResponsePacket.WearableDataBlock(); + cachedresp.WearableData[i].TextureIndex = chechedtex.WearableData[i].TextureIndex; + cachedresp.WearableData[i].TextureID = LLUUID.Zero; + cachedresp.WearableData[i].HostName = new byte[0]; + } + + this.OutPacket(cachedresp); + break; case PacketType.ObjectAdd: m_world.AddNewPrim((ObjectAddPacket)Pack, this); break; -- cgit v1.1