diff options
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 7e3937c..cfebd14 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -2131,14 +2131,31 @@ namespace OpenSim.Region.Environment.Scenes | |||
2131 | return avatar; | 2131 | return avatar; |
2132 | } | 2132 | } |
2133 | 2133 | ||
2134 | /// <summary> | ||
2135 | /// Get the avatar apperance for the given client. | ||
2136 | /// </summary> | ||
2137 | /// <param name="client"></param> | ||
2138 | /// <param name="appearance"></param> | ||
2134 | public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) | 2139 | public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) |
2135 | { | 2140 | { |
2136 | appearance = null; // VS needs this line, mono doesn't | 2141 | appearance = null; // VS needs this line, mono doesn't |
2137 | if (m_AvatarFactory == null || | 2142 | |
2138 | !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) | 2143 | try |
2139 | { | 2144 | { |
2140 | m_log.Warn("[APPEARANCE]: Appearance not found, creating default"); | 2145 | if (m_AvatarFactory == null || |
2146 | !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) | ||
2147 | { | ||
2148 | m_log.Warn("[APPEARANCE]: Appearance not found, creating default"); | ||
2149 | appearance = new AvatarAppearance(); | ||
2150 | } | ||
2141 | } | 2151 | } |
2152 | catch (Exception e) | ||
2153 | { | ||
2154 | m_log.ErrorFormat( | ||
2155 | "[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}", | ||
2156 | client.Name, client.AgentId, e); | ||
2157 | appearance = new AvatarAppearance(); | ||
2158 | } | ||
2142 | } | 2159 | } |
2143 | 2160 | ||
2144 | /// <summary> | 2161 | /// <summary> |