diff options
author | UbitUmarov | 2014-09-19 16:51:51 +0100 |
---|---|---|
committer | UbitUmarov | 2014-09-19 16:51:51 +0100 |
commit | 9c552212a983c7e076c53340af9f47584d641aff (patch) | |
tree | fafb3845ea011b23f80944f5f8a29a57b93f3d79 | |
parent | fix positions on same frames transitions (diff) | |
download | opensim-SC-9c552212a983c7e076c53340af9f47584d641aff.zip opensim-SC-9c552212a983c7e076c53340af9f47584d641aff.tar.gz opensim-SC-9c552212a983c7e076c53340af9f47584d641aff.tar.bz2 opensim-SC-9c552212a983c7e076c53340af9f47584d641aff.tar.xz |
exclude npcs from baked cache
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 |
2 files changed, 24 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index dc16593..bd243ad 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -366,6 +366,10 @@ 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 | // npcs dont have baked cache | ||
370 | if (((ScenePresence)sp).isNPC) | ||
371 | return true; | ||
372 | |||
369 | // uploaded baked textures will be in assets local cache | 373 | // uploaded baked textures will be in assets local cache |
370 | IAssetService cache = m_scene.AssetService; | 374 | IAssetService cache = m_scene.AssetService; |
371 | 375 | ||
@@ -485,6 +489,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
485 | { | 489 | { |
486 | int hits = 0; | 490 | int hits = 0; |
487 | 491 | ||
492 | if (((ScenePresence)sp).isNPC) | ||
493 | return true; | ||
494 | |||
488 | lock (m_setAppearanceLock) | 495 | lock (m_setAppearanceLock) |
489 | { | 496 | { |
490 | IAssetService cache = m_scene.AssetService; | 497 | IAssetService cache = m_scene.AssetService; |
@@ -650,6 +657,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
650 | 657 | ||
651 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) | 658 | public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) |
652 | { | 659 | { |
660 | if (((ScenePresence)sp).isNPC) | ||
661 | return 0; | ||
662 | |||
653 | int texturesRebaked = 0; | 663 | int texturesRebaked = 0; |
654 | IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); | 664 | IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>(); |
655 | 665 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9d06c26..9c55d4a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1703,6 +1703,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1703 | m_log.DebugFormat("[CompleteMovement] WaitForUpdateAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); | 1703 | m_log.DebugFormat("[CompleteMovement] WaitForUpdateAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); |
1704 | 1704 | ||
1705 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); | 1705 | bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); |
1706 | |||
1706 | if (!MakeRootAgent(AbsolutePosition, flying)) | 1707 | if (!MakeRootAgent(AbsolutePosition, flying)) |
1707 | { | 1708 | { |
1708 | m_log.DebugFormat( | 1709 | m_log.DebugFormat( |
@@ -1724,7 +1725,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1724 | look = new Vector3(0.99f, 0.042f, 0); | 1725 | look = new Vector3(0.99f, 0.042f, 0); |
1725 | } | 1726 | } |
1726 | 1727 | ||
1727 | if (!IsChildAgent) | 1728 | if (!IsChildAgent && !isNPC) |
1728 | { | 1729 | { |
1729 | InventoryFolderBase cof = m_scene.InventoryService.GetFolderForType(client.AgentId, (AssetType)46); | 1730 | InventoryFolderBase cof = m_scene.InventoryService.GetFolderForType(client.AgentId, (AssetType)46); |
1730 | if (cof == null) | 1731 | if (cof == null) |
@@ -1790,16 +1791,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
1790 | 1791 | ||
1791 | // verify baked textures and cache | 1792 | // verify baked textures and cache |
1792 | 1793 | ||
1794 | |||
1793 | bool cachedbaked = false; | 1795 | bool cachedbaked = false; |
1794 | 1796 | ||
1795 | if (m_scene.AvatarFactory != null) | 1797 | if (isNPC) |
1796 | cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this); | 1798 | cachedbaked = true; |
1797 | 1799 | else | |
1798 | // not sure we need this | ||
1799 | if (!cachedbaked) | ||
1800 | { | 1800 | { |
1801 | if (m_scene.AvatarFactory != null) | 1801 | if (m_scene.AvatarFactory != null) |
1802 | m_scene.AvatarFactory.QueueAppearanceSave(UUID); | 1802 | cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this); |
1803 | |||
1804 | // not sure we need this | ||
1805 | if (!cachedbaked) | ||
1806 | { | ||
1807 | if (m_scene.AvatarFactory != null) | ||
1808 | m_scene.AvatarFactory.QueueAppearanceSave(UUID); | ||
1809 | } | ||
1803 | } | 1810 | } |
1804 | 1811 | ||
1805 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | 1812 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); |