diff options
Diffstat (limited to 'OpenSim.RegionServer/Assets/AssetCache.cs')
-rw-r--r-- | OpenSim.RegionServer/Assets/AssetCache.cs | 18 |
1 files changed, 12 insertions, 6 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 | ||