diff options
author | Mic Bowman | 2010-12-03 16:17:50 -0800 |
---|---|---|
committer | Melanie | 2010-12-03 23:45:00 +0000 |
commit | df860516bf4fa4e4196be4d5fc26db71d98334f4 (patch) | |
tree | cc941c190fe2647835b9453fdbaaccb85611986d /OpenSim/Region/Framework | |
parent | minor: change OpenSimBase log messages associated with newer module loader to... (diff) | |
download | opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.zip opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.tar.gz opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.tar.bz2 opensim-SC_OLD-df860516bf4fa4e4196be4d5fc26db71d98334f4.tar.xz |
Various bug fixes for appearance handling: more aggressive reset of textures and vparams when appearance is not cached and when wearables change. Send appearance to the viewer with initial data.
Cleaned up (and added) debugging.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 82214bf..a1c80e5 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2418,30 +2418,44 @@ namespace OpenSim.Region.Framework.Scenes | |||
2418 | // the inventory arrives | 2418 | // the inventory arrives |
2419 | // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); | 2419 | // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); |
2420 | 2420 | ||
2421 | // This agent just became root. We are going to tell everyone about it. The process of | 2421 | bool cachedappearance = false; |
2422 | // getting other avatars information was initiated in the constructor... don't do it | ||
2423 | // again here... | ||
2424 | SendAvatarDataToAllAgents(); | ||
2425 | 2422 | ||
2426 | // We have an appearance but we may not have the baked textures. Check the asset cache | 2423 | // We have an appearance but we may not have the baked textures. Check the asset cache |
2427 | // to see if all the baked textures are already here. | 2424 | // to see if all the baked textures are already here. |
2428 | if (m_scene.AvatarFactory != null) | 2425 | if (m_scene.AvatarFactory != null) |
2429 | { | 2426 | { |
2430 | if (m_scene.AvatarFactory.ValidateBakedTextureCache(m_controllingClient)) | 2427 | cachedappearance = m_scene.AvatarFactory.ValidateBakedTextureCache(m_controllingClient); |
2431 | { | ||
2432 | // m_log.WarnFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); | ||
2433 | SendAppearanceToAgent(this); | ||
2434 | |||
2435 | // If the avatars baked textures are all in the cache, then we have a | ||
2436 | // complete appearance... send it out, if not, then we'll send it when | ||
2437 | // the avatar finishes updating its appearance | ||
2438 | SendAppearanceToAllOtherAgents(); | ||
2439 | } | ||
2440 | } | 2428 | } |
2441 | else | 2429 | else |
2442 | { | 2430 | { |
2443 | m_log.WarnFormat("[SCENEPRESENCE]: AvatarFactory not set for {0}", Name); | 2431 | m_log.WarnFormat("[SCENEPRESENCE]: AvatarFactory not set for {0}", Name); |
2444 | } | 2432 | } |
2433 | |||
2434 | // If we aren't using a cached appearance, then clear out the baked textures | ||
2435 | if (! cachedappearance) | ||
2436 | { | ||
2437 | m_appearance.ResetAppearance(); | ||
2438 | if (m_scene.AvatarFactory != null) | ||
2439 | m_scene.AvatarFactory.QueueAppearanceSave(UUID); | ||
2440 | } | ||
2441 | |||
2442 | // This agent just became root. We are going to tell everyone about it. The process of | ||
2443 | // getting other avatars information was initiated in the constructor... don't do it | ||
2444 | // again here... this comes after the cached appearance check because the avatars | ||
2445 | // appearance goes into the avatar update packet | ||
2446 | SendAvatarDataToAllAgents(); | ||
2447 | SendAppearanceToAgent(this); | ||
2448 | |||
2449 | // If we are using the the cached appearance then send it out to everyone | ||
2450 | if (cachedappearance) | ||
2451 | { | ||
2452 | m_log.InfoFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); | ||
2453 | |||
2454 | // If the avatars baked textures are all in the cache, then we have a | ||
2455 | // complete appearance... send it out, if not, then we'll send it when | ||
2456 | // the avatar finishes updating its appearance | ||
2457 | SendAppearanceToAllOtherAgents(); | ||
2458 | } | ||
2445 | } | 2459 | } |
2446 | 2460 | ||
2447 | /// <summary> | 2461 | /// <summary> |
@@ -2501,7 +2515,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2501 | /// Send avatar data to an agent. | 2515 | /// Send avatar data to an agent. |
2502 | /// </summary> | 2516 | /// </summary> |
2503 | /// <param name="avatar"></param> | 2517 | /// <param name="avatar"></param> |
2504 | private void SendAvatarDataToAgent(ScenePresence avatar) | 2518 | public void SendAvatarDataToAgent(ScenePresence avatar) |
2505 | { | 2519 | { |
2506 | // m_log.WarnFormat("[SP] Send avatar data from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); | 2520 | // m_log.WarnFormat("[SP] Send avatar data from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); |
2507 | 2521 | ||
@@ -2569,7 +2583,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2569 | /// Send appearance data to an agent. | 2583 | /// Send appearance data to an agent. |
2570 | /// </summary> | 2584 | /// </summary> |
2571 | /// <param name="avatar"></param> | 2585 | /// <param name="avatar"></param> |
2572 | private void SendAppearanceToAgent(ScenePresence avatar) | 2586 | public void SendAppearanceToAgent(ScenePresence avatar) |
2573 | { | 2587 | { |
2574 | // m_log.WarnFormat("[SP] Send appearance from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); | 2588 | // m_log.WarnFormat("[SP] Send appearance from {0} to {1}",m_uuid,avatar.ControllingClient.AgentId); |
2575 | 2589 | ||