diff options
author | diva | 2009-02-17 00:35:52 +0000 |
---|---|---|
committer | diva | 2009-02-17 00:35:52 +0000 |
commit | 7cc906213795fbe4878c0cfb8351272e847617e9 (patch) | |
tree | 861e1562c10feb985e2e04536d1268f993761ab6 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | cleanup (diff) | |
download | opensim-SC-7cc906213795fbe4878c0cfb8351272e847617e9.zip opensim-SC-7cc906213795fbe4878c0cfb8351272e847617e9.tar.gz opensim-SC-7cc906213795fbe4878c0cfb8351272e847617e9.tar.bz2 opensim-SC-7cc906213795fbe4878c0cfb8351272e847617e9.tar.xz |
Major change to how appearance is managed, including changes in login and user service/server. Appearance is now sent by the user service/server along with all other loginparams. Regions don't query the user service for appearance anymore. The appearance is passed along from region to region as the avie moves around. And, as before, it's stored back with the user service as the client changes the avie's appearance. Child agents have default appearances that are set to the actual appearance when the avie moves to that region. (as before, child agents are invisible and non-physical).
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c3ab5e9..5badd2d 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2089,8 +2089,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2089 | /// <returns></returns> | 2089 | /// <returns></returns> |
2090 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client) | 2090 | protected virtual ScenePresence CreateAndAddScenePresence(IClientAPI client) |
2091 | { | 2091 | { |
2092 | AvatarAppearance appearance = new AvatarAppearance(); | 2092 | AvatarAppearance appearance = null; |
2093 | //GetAvatarAppearance(client, out appearance); | 2093 | GetAvatarAppearance(client, out appearance); |
2094 | 2094 | ||
2095 | ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance); | 2095 | ScenePresence avatar = m_sceneGraph.CreateAndAddChildScenePresence(client, appearance); |
2096 | //avatar.KnownRegions = GetChildrenSeeds(avatar.UUID); | 2096 | //avatar.KnownRegions = GetChildrenSeeds(avatar.UUID); |
@@ -2104,23 +2104,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
2104 | /// <param name="appearance"></param> | 2104 | /// <param name="appearance"></param> |
2105 | public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) | 2105 | public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) |
2106 | { | 2106 | { |
2107 | appearance = new AvatarAppearance(); | 2107 | AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); |
2108 | 2108 | appearance = aCircuit.Appearance; | |
2109 | try | 2109 | if (appearance == null) |
2110 | { | ||
2111 | if (m_AvatarFactory != null) | ||
2112 | { | ||
2113 | if (m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) | ||
2114 | return; | ||
2115 | } | ||
2116 | } | ||
2117 | catch (Exception e) | ||
2118 | { | 2110 | { |
2119 | m_log.ErrorFormat("[APPEARANCE]: Problem fetching appearance for avatar {0}, {1}", | 2111 | m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); |
2120 | client.Name, e); | 2112 | appearance = new AvatarAppearance(); |
2121 | } | 2113 | } |
2122 | 2114 | ||
2123 | m_log.Warn("[APPEARANCE]: Appearance not found, returning default"); | 2115 | //try |
2116 | //{ | ||
2117 | // if (m_AvatarFactory != null) | ||
2118 | // { | ||
2119 | // if (m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) | ||
2120 | // return; | ||
2121 | // } | ||
2122 | //} | ||
2123 | //catch (Exception e) | ||
2124 | //{ | ||
2125 | // m_log.ErrorFormat("[APPEARANCE]: Problem fetching appearance for avatar {0}, {1}", | ||
2126 | // client.Name, e); | ||
2127 | //} | ||
2128 | |||
2129 | //m_log.Warn("[APPEARANCE]: Appearance not found, returning default"); | ||
2124 | } | 2130 | } |
2125 | 2131 | ||
2126 | /// <summary> | 2132 | /// <summary> |