diff options
author | UbitUmarov | 2012-12-13 02:55:36 +0000 |
---|---|---|
committer | UbitUmarov | 2012-12-13 02:55:36 +0000 |
commit | 20773dcfccc04d8af14e27f87746711bfaba07b1 (patch) | |
tree | b1428733102b796e1fd87e204da4d24b9f66b670 /OpenSim/Region/CoreModules/Avatar | |
parent | make ubitODE ignore X and Y rotation components on avatar rotations (diff) | |
download | opensim-SC-20773dcfccc04d8af14e27f87746711bfaba07b1.zip opensim-SC-20773dcfccc04d8af14e27f87746711bfaba07b1.tar.gz opensim-SC-20773dcfccc04d8af14e27f87746711bfaba07b1.tar.bz2 opensim-SC-20773dcfccc04d8af14e27f87746711bfaba07b1.tar.xz |
add a Check method to flotsamAssetCache, so to check if a asset is in
cache without actually loading it. Make use limited use of it in
avatarfactory textures check. Also on llclientview
HandleAgentTextureCached that now should work. Other asset cache modules
for now will return false, so are broken. baked textures logic
still unchanged. *UNTESTED*
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 4c42397..3532b1d 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -361,6 +361,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
361 | public bool ValidateBakedTextureCache(IScenePresence sp) | 361 | public bool ValidateBakedTextureCache(IScenePresence sp) |
362 | { | 362 | { |
363 | bool defonly = true; // are we only using default textures | 363 | bool defonly = true; // are we only using default textures |
364 | IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); | ||
364 | 365 | ||
365 | // Process the texture entry | 366 | // Process the texture entry |
366 | for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) | 367 | for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) |
@@ -385,8 +386,16 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
385 | 386 | ||
386 | defonly = false; // found a non-default texture reference | 387 | defonly = false; // found a non-default texture reference |
387 | 388 | ||
388 | if (m_scene.AssetService.Get(face.TextureID.ToString()) == null) | 389 | if (cache != null) |
389 | return false; | 390 | { |
391 | if (!cache.Check(face.TextureID.ToString())) | ||
392 | return false; | ||
393 | } | ||
394 | else | ||
395 | { | ||
396 | if (m_scene.AssetService.Get(face.TextureID.ToString()) == null) | ||
397 | return false; | ||
398 | } | ||
390 | } | 399 | } |
391 | 400 | ||
392 | // m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1}", sp.Name, sp.UUID); | 401 | // m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1}", sp.Name, sp.UUID); |
@@ -398,6 +407,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
398 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) | 407 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) |
399 | { | 408 | { |
400 | int texturesRebaked = 0; | 409 | int texturesRebaked = 0; |
410 | IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); | ||
401 | 411 | ||
402 | for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) | 412 | for (int i = 0; i < AvatarAppearance.BAKE_INDICES.Length; i++) |
403 | { | 413 | { |
@@ -421,21 +431,36 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
421 | 431 | ||
422 | if (missingTexturesOnly) | 432 | if (missingTexturesOnly) |
423 | { | 433 | { |
424 | if (m_scene.AssetService.Get(face.TextureID.ToString()) != null) | 434 | if (cache != null) |
425 | { | 435 | { |
426 | continue; | 436 | if (cache.Check(face.TextureID.ToString())) |
437 | continue; | ||
438 | else | ||
439 | { | ||
440 | m_log.DebugFormat( | ||
441 | "[AVFACTORY]: Missing baked texture {0} ({1}) for {2}, requesting rebake.", | ||
442 | face.TextureID, idx, sp.Name); | ||
443 | } | ||
427 | } | 444 | } |
428 | else | 445 | else |
429 | { | 446 | { |
430 | // On inter-simulator teleports, this occurs if baked textures are not being stored by the | 447 | if (m_scene.AssetService.Get(face.TextureID.ToString()) != null) |
431 | // grid asset service (which means that they are not available to the new region and so have | 448 | { |
432 | // to be re-requested from the client). | 449 | continue; |
433 | // | 450 | } |
434 | // The only available core OpenSimulator behaviour right now | 451 | |
435 | // is not to store these textures, temporarily or otherwise. | 452 | else |
436 | m_log.DebugFormat( | 453 | { |
437 | "[AVFACTORY]: Missing baked texture {0} ({1}) for {2}, requesting rebake.", | 454 | // On inter-simulator teleports, this occurs if baked textures are not being stored by the |
438 | face.TextureID, idx, sp.Name); | 455 | // grid asset service (which means that they are not available to the new region and so have |
456 | // to be re-requested from the client). | ||
457 | // | ||
458 | // The only available core OpenSimulator behaviour right now | ||
459 | // is not to store these textures, temporarily or otherwise. | ||
460 | m_log.DebugFormat( | ||
461 | "[AVFACTORY]: Missing baked texture {0} ({1}) for {2}, requesting rebake.", | ||
462 | face.TextureID, idx, sp.Name); | ||
463 | } | ||
439 | } | 464 | } |
440 | } | 465 | } |
441 | else | 466 | else |