aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-10-28 17:35:36 +0000
committerJustin Clarke Casey2008-10-28 17:35:36 +0000
commit247b806134819f3806c078ca891791b718ff8984 (patch)
tree71b36f876c2b78426e76bb9c80bf1ee984da95d3 /OpenSim/Region/Environment/Modules
parent* Eliminate an extra unnecessary appearance fetch on login (diff)
downloadopensim-SC_OLD-247b806134819f3806c078ca891791b718ff8984.zip
opensim-SC_OLD-247b806134819f3806c078ca891791b718ff8984.tar.gz
opensim-SC_OLD-247b806134819f3806c078ca891791b718ff8984.tar.bz2
opensim-SC_OLD-247b806134819f3806c078ca891791b718ff8984.tar.xz
* minor: Add documentation to some of the appearance methods, change some logging messages
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index d3b782f..94c27a5 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -131,8 +131,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
131 } 131 }
132 else 132 else
133 { 133 {
134 // UUID assetId;
135
136 InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID); 134 InventoryItemBase baseItem = profile.RootFolder.FindItem(appearance.Wearables[i].ItemID);
137 135
138 if (baseItem != null) 136 if (baseItem != null)
@@ -141,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
141 } 139 }
142 else 140 else
143 { 141 {
144 m_log.ErrorFormat("[APPEARANCE] Can't find inventory item {0}, setting to default", appearance.Wearables[i].ItemID); 142 m_log.ErrorFormat("[APPEARANCE]: Can't find inventory item {0}, setting to default", appearance.Wearables[i].ItemID);
145 appearance.Wearables[i].AssetID = def.Wearables[i].AssetID; 143 appearance.Wearables[i].AssetID = def.Wearables[i].AssetID;
146 } 144 }
147 } 145 }
@@ -149,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
149 } 147 }
150 else 148 else
151 { 149 {
152 m_log.Error("[APPEARANCE] you have no inventory, appearance stuff isn't going to work"); 150 m_log.Error("[APPEARANCE]: you have no inventory, appearance stuff isn't going to work");
153 } 151 }
154 } 152 }
155 153
@@ -157,19 +155,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
157 { 155 {
158 IClientAPI clientView = (IClientAPI)sender; 156 IClientAPI clientView = (IClientAPI)sender;
159 ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId); 157 ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId);
160 if (avatar == null) { 158
161 m_log.Info("Avatar is child agent, ignoring AvatarIsWearing event"); 159 if (avatar == null)
160 {
161 m_log.Warn("[APPEARANCE]: Avatar is child agent, ignoring AvatarIsWearing event");
162 return; 162 return;
163 } 163 }
164 164
165 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); 165 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
166 166
167 AvatarAppearance avatAppearance = null; 167 AvatarAppearance avatAppearance = null;
168 if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) { 168 if (!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance))
169 m_log.Info("We didn't seem to find the appearance, falling back to ScenePresense"); 169 {
170 m_log.Info("[APPEARANCE]: We didn't seem to find the appearance, falling back to ScenePresense");
170 avatAppearance = avatar.Appearance; 171 avatAppearance = avatar.Appearance;
171 } 172 }
172 m_log.Info("Calling Avatar is Wearing"); 173
174 m_log.Info("[APPEARANCE]: Calling Avatar is Wearing");
175
173 if (profile != null) 176 if (profile != null)
174 { 177 {
175 if (profile.RootFolder != null) 178 if (profile.RootFolder != null)
@@ -181,6 +184,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
181 avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; 184 avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID;
182 } 185 }
183 } 186 }
187
184 SetAppearanceAssets(profile, ref avatAppearance); 188 SetAppearanceAssets(profile, ref avatAppearance);
185 189
186 m_scene.CommsManager.AvatarService.UpdateUserAppearance(clientView.AgentId, avatAppearance); 190 m_scene.CommsManager.AvatarService.UpdateUserAppearance(clientView.AgentId, avatAppearance);
@@ -188,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.AvatarFactory
188 } 192 }
189 else 193 else
190 { 194 {
191 m_log.Error("Root Profile is null, we can't set the appearance"); 195 m_log.Error("[APPEARANCE]: Root Profile is null, we can't set the appearance");
192 } 196 }
193 } 197 }
194 } 198 }