exclude npcs from baked cache
parent
242bb425f3
commit
9c552212a9
|
@ -366,6 +366,10 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
// called on textures update
|
// called on textures update
|
||||||
public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems)
|
public bool UpdateBakedTextureCache(IScenePresence sp, WearableCacheItem[] cacheItems)
|
||||||
{
|
{
|
||||||
|
// npcs dont have baked cache
|
||||||
|
if (((ScenePresence)sp).isNPC)
|
||||||
|
return true;
|
||||||
|
|
||||||
// uploaded baked textures will be in assets local cache
|
// uploaded baked textures will be in assets local cache
|
||||||
IAssetService cache = m_scene.AssetService;
|
IAssetService cache = m_scene.AssetService;
|
||||||
|
|
||||||
|
@ -485,6 +489,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
{
|
{
|
||||||
int hits = 0;
|
int hits = 0;
|
||||||
|
|
||||||
|
if (((ScenePresence)sp).isNPC)
|
||||||
|
return true;
|
||||||
|
|
||||||
lock (m_setAppearanceLock)
|
lock (m_setAppearanceLock)
|
||||||
{
|
{
|
||||||
IAssetService cache = m_scene.AssetService;
|
IAssetService cache = m_scene.AssetService;
|
||||||
|
@ -650,6 +657,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
|
|
||||||
public int RequestRebake(IScenePresence sp, bool missingTexturesOnly)
|
public int RequestRebake(IScenePresence sp, bool missingTexturesOnly)
|
||||||
{
|
{
|
||||||
|
if (((ScenePresence)sp).isNPC)
|
||||||
|
return 0;
|
||||||
|
|
||||||
int texturesRebaked = 0;
|
int texturesRebaked = 0;
|
||||||
IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
IImprovedAssetCache cache = m_scene.RequestModuleInterface<IImprovedAssetCache>();
|
||||||
|
|
||||||
|
|
|
@ -1703,6 +1703,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_log.DebugFormat("[CompleteMovement] WaitForUpdateAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
|
m_log.DebugFormat("[CompleteMovement] WaitForUpdateAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
|
||||||
|
|
||||||
bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
bool flying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
|
||||||
|
|
||||||
if (!MakeRootAgent(AbsolutePosition, flying))
|
if (!MakeRootAgent(AbsolutePosition, flying))
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
|
@ -1724,7 +1725,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
look = new Vector3(0.99f, 0.042f, 0);
|
look = new Vector3(0.99f, 0.042f, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsChildAgent)
|
if (!IsChildAgent && !isNPC)
|
||||||
{
|
{
|
||||||
InventoryFolderBase cof = m_scene.InventoryService.GetFolderForType(client.AgentId, (AssetType)46);
|
InventoryFolderBase cof = m_scene.InventoryService.GetFolderForType(client.AgentId, (AssetType)46);
|
||||||
if (cof == null)
|
if (cof == null)
|
||||||
|
@ -1790,8 +1791,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// verify baked textures and cache
|
// verify baked textures and cache
|
||||||
|
|
||||||
|
|
||||||
bool cachedbaked = false;
|
bool cachedbaked = false;
|
||||||
|
|
||||||
|
if (isNPC)
|
||||||
|
cachedbaked = true;
|
||||||
|
else
|
||||||
|
{
|
||||||
if (m_scene.AvatarFactory != null)
|
if (m_scene.AvatarFactory != null)
|
||||||
cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this);
|
cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this);
|
||||||
|
|
||||||
|
@ -1801,6 +1807,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_scene.AvatarFactory != null)
|
if (m_scene.AvatarFactory != null)
|
||||||
m_scene.AvatarFactory.QueueAppearanceSave(UUID);
|
m_scene.AvatarFactory.QueueAppearanceSave(UUID);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<ScenePresence> allpresences = m_scene.GetScenePresences();
|
List<ScenePresence> allpresences = m_scene.GetScenePresences();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue