Hopefully fixed the texture uploading and the crashing when a prim with a uploaded texture on it is moved.

This commit is contained in:
MW
2007-03-25 20:23:06 +00:00
parent fb9562e419
commit 84c2a72140
5 changed files with 30 additions and 24 deletions

View File

@@ -139,17 +139,23 @@ namespace OpenSim.Assets
public void AddAsset(AssetBase asset)
{
this._assetServer.UploadNewAsset(asset);
if (asset.Type == 0)
{
//texture
TextureImage textur = new TextureImage(asset);
this.Textures.Add(textur.FullID, textur);
if (!this.Textures.ContainsKey(asset.FullID))
{ //texture
TextureImage textur = new TextureImage(asset);
this.Textures.Add(textur.FullID, textur);
this._assetServer.UploadNewAsset(asset);
}
}
else
{
AssetInfo assetInf = new AssetInfo(asset);
this.Assets.Add(assetInf.FullID, assetInf);
if (!this.Assets.ContainsKey(asset.FullID))
{
AssetInfo assetInf = new AssetInfo(asset);
this.Assets.Add(assetInf.FullID, assetInf);
this._assetServer.UploadNewAsset(asset);
}
}
}