catch case where avatar might have been child agent
parent
401e9bc3b9
commit
fb120e3e23
|
@ -117,11 +117,16 @@ namespace OpenSim.Region.Modules.AvatarFactory
|
||||||
{
|
{
|
||||||
IClientAPI clientView = (IClientAPI)sender;
|
IClientAPI clientView = (IClientAPI)sender;
|
||||||
ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId);
|
ScenePresence avatar = m_scene.GetScenePresence(clientView.AgentId);
|
||||||
|
if(avatar == null) {
|
||||||
|
m_log.Info("Avatar is child agent, ignoring AvatarIsWearing event");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
||||||
|
|
||||||
AvatarAppearance avatAppearance = null;
|
AvatarAppearance avatAppearance = null;
|
||||||
if(!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) {
|
if(!TryGetAvatarAppearance(clientView.AgentId, out avatAppearance)) {
|
||||||
m_log.Info("We didn't seem to find the appearance");
|
m_log.Info("We didn't seem to find the appearance, falling back to ScenePresense");
|
||||||
avatAppearance = avatar.Appearance;
|
avatAppearance = avatar.Appearance;
|
||||||
}
|
}
|
||||||
m_log.Info("Calling Avatar is Wearing");
|
m_log.Info("Calling Avatar is Wearing");
|
||||||
|
|
Loading…
Reference in New Issue