mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
Hopefully fixed the texture uploading and the crashing when a prim with a uploaded texture on it is moved.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,10 +191,10 @@ namespace OpenSim.Assets
|
||||
InventoryReply.InventoryData[0].AssetID = Item.AssetID;
|
||||
InventoryReply.InventoryData[0].CreatorID = Item.CreatorID;
|
||||
InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS;
|
||||
InventoryReply.InventoryData[0].CreationDate = 1000;
|
||||
InventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0");
|
||||
InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
|
||||
InventoryReply.InventoryData[0].Flags = 1;
|
||||
InventoryReply.InventoryData[0].Flags = 0;
|
||||
InventoryReply.InventoryData[0].FolderID = Item.FolderID;
|
||||
InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
|
||||
InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
|
||||
@@ -228,7 +228,7 @@ namespace OpenSim.Assets
|
||||
InventoryReply.InventoryData[0].CreationDate = 1000;
|
||||
InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0");
|
||||
InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS;
|
||||
InventoryReply.InventoryData[0].Flags = 1;
|
||||
InventoryReply.InventoryData[0].Flags = 0;
|
||||
InventoryReply.InventoryData[0].FolderID = Item.FolderID;
|
||||
InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000");
|
||||
InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS;
|
||||
|
||||
Reference in New Issue
Block a user