diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 14 |
2 files changed, 17 insertions, 22 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index ccc6861..2290c44 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -366,8 +366,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
366 | // called on textures update | 366 | // called on textures update |
367 | public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems) | 367 | public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems) |
368 | { | 368 | { |
369 | bool defonly = true; // are we only using default textures | ||
370 | |||
371 | // uploaded baked textures will be in assets local cache | 369 | // uploaded baked textures will be in assets local cache |
372 | IAssetService cache = m_scene.AssetService; | 370 | IAssetService cache = m_scene.AssetService; |
373 | 371 | ||
@@ -409,8 +407,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
409 | continue; | 407 | continue; |
410 | } | 408 | } |
411 | 409 | ||
412 | defonly = false; // found a non-default texture reference | ||
413 | |||
414 | if(sp.Appearance.Texture.FaceTextures[idx].TextureID == wearableCache[idx].TextureID) | 410 | if(sp.Appearance.Texture.FaceTextures[idx].TextureID == wearableCache[idx].TextureID) |
415 | { | 411 | { |
416 | if(wearableCache[idx].CacheId != cacheItems[i].CacheId) | 412 | if(wearableCache[idx].CacheId != cacheItems[i].CacheId) |
@@ -479,14 +475,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
479 | sp.Appearance.WearableCacheItems[j].TextureID); | 475 | sp.Appearance.WearableCacheItems[j].TextureID); |
480 | } | 476 | } |
481 | 477 | ||
482 | // If we only found default textures, then the appearance is not cached | 478 | return (hits == cacheItems.Length); |
483 | return (defonly ? false : true); | ||
484 | } | 479 | } |
485 | 480 | ||
486 | // called when we get a new root avatar | 481 | // called when we get a new root avatar |
487 | public bool ValidateBakedTextureCache(IScenePresence sp) | 482 | public bool ValidateBakedTextureCache(IScenePresence sp) |
488 | { | 483 | { |
489 | bool defonly = true; // are we only using default textures | ||
490 | int hits = 0; | 484 | int hits = 0; |
491 | 485 | ||
492 | lock (m_setAppearanceLock) | 486 | lock (m_setAppearanceLock) |
@@ -556,10 +550,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
556 | face = sp.Appearance.Texture.FaceTextures[idx]; | 550 | face = sp.Appearance.Texture.FaceTextures[idx]; |
557 | 551 | ||
558 | // this should be removed | 552 | // this should be removed |
559 | if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) | 553 | if (face.TextureID != UUID.Zero && face.TextureID != AppearanceManager.DEFAULT_AVATAR_TEXTURE) |
560 | { | 554 | hits++; |
561 | defonly = false; // found a non-default texture reference | ||
562 | } | ||
563 | 555 | ||
564 | continue; | 556 | continue; |
565 | } | 557 | } |
@@ -587,10 +579,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
587 | } | 579 | } |
588 | 580 | ||
589 | if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) | 581 | if (face.TextureID == UUID.Zero || face.TextureID == AppearanceManager.DEFAULT_AVATAR_TEXTURE) |
590 | { | ||
591 | defonly = false; // found a non-default texture reference | ||
592 | continue; | 582 | continue; |
593 | } | ||
594 | 583 | ||
595 | if (wearableCache[idx].TextureID != face.TextureID) | 584 | if (wearableCache[idx].TextureID != face.TextureID) |
596 | { | 585 | { |
@@ -603,7 +592,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
603 | wearableCache[idx].TextureAsset = null; | 592 | wearableCache[idx].TextureAsset = null; |
604 | if (cache != null) | 593 | if (cache != null) |
605 | { | 594 | { |
606 | wearableCache[idx].TextureAsset = m_scene.AssetService.Get(face.TextureID.ToString()); | 595 | wearableCache[idx].TextureAsset = m_scene.AssetService.GetCached(face.TextureID.ToString()); |
607 | if (wearableCache[idx].TextureAsset == null) | 596 | if (wearableCache[idx].TextureAsset == null) |
608 | { | 597 | { |
609 | wearableCache[idx].CacheId = UUID.Zero; | 598 | wearableCache[idx].CacheId = UUID.Zero; |
@@ -618,7 +607,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
618 | sp.Appearance.WearableCacheItems = wearableCache; | 607 | sp.Appearance.WearableCacheItems = wearableCache; |
619 | } | 608 | } |
620 | 609 | ||
621 | m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2} {3}", sp.Name, sp.UUID, hits, defonly.ToString()); | 610 | m_log.DebugFormat("[AVFACTORY]: Completed texture check for {0} {1} {2}", sp.Name, sp.UUID, hits); |
622 | // debug | 611 | // debug |
623 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) | 612 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) |
624 | { | 613 | { |
@@ -629,9 +618,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
629 | sp.Appearance.WearableCacheItems[j].TextureID); | 618 | sp.Appearance.WearableCacheItems[j].TextureID); |
630 | } | 619 | } |
631 | 620 | ||
632 | // If we only found default textures, then the appearance is not cached | 621 | return (hits >= AvatarAppearance.BAKE_INDICES.Length - 1); // skirt is optional |
633 | return (defonly ? false : true); | ||
634 | } | 622 | } |
623 | |||
635 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) | 624 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) |
636 | { | 625 | { |
637 | int texturesRebaked = 0; | 626 | int texturesRebaked = 0; |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index d6d86b9..af26998 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1529,7 +1529,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1529 | GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos); | 1529 | GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos); |
1530 | if (neighbourRegion == null) | 1530 | if (neighbourRegion == null) |
1531 | { | 1531 | { |
1532 | agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel"); | 1532 | agent.ControllingClient.SendAlertMessage("Cannot region cross into void"); |
1533 | return false; | 1533 | return false; |
1534 | } | 1534 | } |
1535 | 1535 | ||
@@ -1680,7 +1680,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1680 | neighbourRegion.RegionName, agent.Name); | 1680 | neighbourRegion.RegionName, agent.Name); |
1681 | 1681 | ||
1682 | ReInstantiateScripts(agent); | 1682 | ReInstantiateScripts(agent); |
1683 | agent.AddToPhysicalScene(isFlying); | 1683 | if(agent.ParentID == 0 && agent.ParentUUID == UUID.Zero) |
1684 | agent.AddToPhysicalScene(isFlying); | ||
1684 | 1685 | ||
1685 | return false; | 1686 | return false; |
1686 | } | 1687 | } |
@@ -1749,8 +1750,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1749 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); | 1750 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); |
1750 | 1751 | ||
1751 | // now we have a child agent in this region. Request all interesting data about other (root) agents | 1752 | // now we have a child agent in this region. Request all interesting data about other (root) agents |
1752 | agent.SendOtherAgentsAvatarDataToMe(); | 1753 | |
1753 | agent.SendOtherAgentsAppearanceToMe(); | 1754 | // why do that? we either where a root having all that or we are leaving the area |
1755 | |||
1756 | // agent.SendOtherAgentsAvatarDataToMe(); | ||
1757 | // agent.SendOtherAgentsAppearanceToMe(); | ||
1758 | |||
1759 | agent.parcelRegionCross(false); | ||
1754 | 1760 | ||
1755 | // Backwards compatibility. Best effort | 1761 | // Backwards compatibility. Best effort |
1756 | if (version == "Unknown" || version == string.Empty) | 1762 | if (version == "Unknown" || version == string.Empty) |