Clothing now seems to work (though there are likely to still be some problems)

0.1-prestable
MW 2007-03-30 12:12:33 +00:00
parent 43da731307
commit cf182b9897
2 changed files with 25 additions and 3 deletions

View File

@ -41,6 +41,7 @@ namespace OpenSim
response.AssetBlock.Success = true; response.AssetBlock.Success = true;
response.AssetBlock.UUID = transactionID.Combine(this.ourClient.SecureSessionID); response.AssetBlock.UUID = transactionID.Combine(this.ourClient.SecureSessionID);
this.ourClient.OutPacket(response); this.ourClient.OutPacket(response);
m_assetCache.AddAsset(asset);
} }
else else
{ {
@ -150,10 +151,11 @@ namespace OpenSim
response.AssetBlock.UUID = trans.TransactionID.Combine(this.ourClient.SecureSessionID); response.AssetBlock.UUID = trans.TransactionID.Combine(this.ourClient.SecureSessionID);
this.ourClient.OutPacket(response); this.ourClient.OutPacket(response);
m_assetCache.AddAsset(trans.Asset);
//check if we should add it to inventory //check if we should add it to inventory
if (trans.AddToInventory) if (trans.AddToInventory)
{ {
m_assetCache.AddAsset(trans.Asset); // m_assetCache.AddAsset(trans.Asset);
m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset);
} }
@ -201,7 +203,7 @@ namespace OpenSim
if (trans.UploadComplete) if (trans.UploadComplete)
{ {
//already complete so we can add it to the inventory //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()); Console.WriteLine( "Item created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated());
} }
else else

View File

@ -69,7 +69,7 @@ namespace OpenSim
private const int MAX_SEQUENCE = 0xFFFFFF; private const int MAX_SEQUENCE = 0xFFFFFF;
private AgentAssetUpload UploadAssets; private AgentAssetUpload UploadAssets;
private LLUUID newAssetFolder = LLUUID.Zero; private LLUUID newAssetFolder = LLUUID.Zero;
private bool debug = false; private bool debug = true;//false;
private World m_world; private World m_world;
private Dictionary<uint, SimClient> m_clientThreads; private Dictionary<uint, SimClient> m_clientThreads;
private AssetCache m_assetCache; private AssetCache m_assetCache;
@ -78,6 +78,7 @@ namespace OpenSim
private OpenSimNetworkHandler m_application; private OpenSimNetworkHandler m_application;
private InventoryCache m_inventoryCache; private InventoryCache m_inventoryCache;
private bool m_sandboxMode; private bool m_sandboxMode;
private int cachedtextureserial = 0;
public IUserServer UserServer public IUserServer UserServer
@ -149,6 +150,25 @@ namespace OpenSim
// Console.WriteLine(appear.ToString()); // Console.WriteLine(appear.ToString());
this.ClientAvatar.SetAppearance(appear); this.ClientAvatar.SetAppearance(appear);
break; 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: case PacketType.ObjectAdd:
m_world.AddNewPrim((ObjectAddPacket)Pack, this); m_world.AddNewPrim((ObjectAddPacket)Pack, this);
break; break;