diff options
author | MW | 2007-03-25 20:23:06 +0000 |
---|---|---|
committer | MW | 2007-03-25 20:23:06 +0000 |
commit | 84c2a72140822fc28da3590b48db392d132ef0ea (patch) | |
tree | f7060653bc50070a48cd86f6940381dbde32c910 /OpenSim.RegionServer/Assets | |
parent | * Hopefully it builds again... (diff) | |
download | opensim-SC-84c2a72140822fc28da3590b48db392d132ef0ea.zip opensim-SC-84c2a72140822fc28da3590b48db392d132ef0ea.tar.gz opensim-SC-84c2a72140822fc28da3590b48db392d132ef0ea.tar.bz2 opensim-SC-84c2a72140822fc28da3590b48db392d132ef0ea.tar.xz |
Hopefully fixed the texture uploading and the crashing when a prim with a uploaded texture on it is moved.
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/Assets/AssetCache.cs | 18 | ||||
-rw-r--r-- | OpenSim.RegionServer/Assets/InventoryCache.cs | 6 |
2 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim.RegionServer/Assets/AssetCache.cs b/OpenSim.RegionServer/Assets/AssetCache.cs index c1b3472..3c28e1c 100644 --- a/OpenSim.RegionServer/Assets/AssetCache.cs +++ b/OpenSim.RegionServer/Assets/AssetCache.cs | |||
@@ -139,17 +139,23 @@ namespace OpenSim.Assets | |||
139 | 139 | ||
140 | public void AddAsset(AssetBase asset) | 140 | public void AddAsset(AssetBase asset) |
141 | { | 141 | { |
142 | this._assetServer.UploadNewAsset(asset); | ||
143 | if (asset.Type == 0) | 142 | if (asset.Type == 0) |
144 | { | 143 | { |
145 | //texture | 144 | if (!this.Textures.ContainsKey(asset.FullID)) |
146 | TextureImage textur = new TextureImage(asset); | 145 | { //texture |
147 | this.Textures.Add(textur.FullID, textur); | 146 | TextureImage textur = new TextureImage(asset); |
147 | this.Textures.Add(textur.FullID, textur); | ||
148 | this._assetServer.UploadNewAsset(asset); | ||
149 | } | ||
148 | } | 150 | } |
149 | else | 151 | else |
150 | { | 152 | { |
151 | AssetInfo assetInf = new AssetInfo(asset); | 153 | if (!this.Assets.ContainsKey(asset.FullID)) |
152 | this.Assets.Add(assetInf.FullID, assetInf); | 154 | { |
155 | AssetInfo assetInf = new AssetInfo(asset); | ||
156 | this.Assets.Add(assetInf.FullID, assetInf); | ||
157 | this._assetServer.UploadNewAsset(asset); | ||
158 | } | ||
153 | } | 159 | } |
154 | } | 160 | } |
155 | 161 | ||
diff --git a/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim.RegionServer/Assets/InventoryCache.cs index 9e73fe5..f50047a 100644 --- a/OpenSim.RegionServer/Assets/InventoryCache.cs +++ b/OpenSim.RegionServer/Assets/InventoryCache.cs | |||
@@ -191,10 +191,10 @@ namespace OpenSim.Assets | |||
191 | InventoryReply.InventoryData[0].AssetID = Item.AssetID; | 191 | InventoryReply.InventoryData[0].AssetID = Item.AssetID; |
192 | InventoryReply.InventoryData[0].CreatorID = Item.CreatorID; | 192 | InventoryReply.InventoryData[0].CreatorID = Item.CreatorID; |
193 | InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS; | 193 | InventoryReply.InventoryData[0].BaseMask = FULL_MASK_PERMISSIONS; |
194 | InventoryReply.InventoryData[0].CreationDate = 1000; | 194 | InventoryReply.InventoryData[0].CreationDate = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; |
195 | InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0"); | 195 | InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0"); |
196 | InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS; | 196 | InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS; |
197 | InventoryReply.InventoryData[0].Flags = 1; | 197 | InventoryReply.InventoryData[0].Flags = 0; |
198 | InventoryReply.InventoryData[0].FolderID = Item.FolderID; | 198 | InventoryReply.InventoryData[0].FolderID = Item.FolderID; |
199 | InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 199 | InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
200 | InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS; | 200 | InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS; |
@@ -228,7 +228,7 @@ namespace OpenSim.Assets | |||
228 | InventoryReply.InventoryData[0].CreationDate = 1000; | 228 | InventoryReply.InventoryData[0].CreationDate = 1000; |
229 | InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0"); | 229 | InventoryReply.InventoryData[0].Description = _enc.GetBytes(Item.Description + "\0"); |
230 | InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS; | 230 | InventoryReply.InventoryData[0].EveryoneMask = FULL_MASK_PERMISSIONS; |
231 | InventoryReply.InventoryData[0].Flags = 1; | 231 | InventoryReply.InventoryData[0].Flags = 0; |
232 | InventoryReply.InventoryData[0].FolderID = Item.FolderID; | 232 | InventoryReply.InventoryData[0].FolderID = Item.FolderID; |
233 | InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 233 | InventoryReply.InventoryData[0].GroupID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
234 | InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS; | 234 | InventoryReply.InventoryData[0].GroupMask = FULL_MASK_PERMISSIONS; |