From: Alan Webb <alan_webb@us.ibm.com>
Change updateAppearance so that nothing is done to the user's appearance unless explicitly requested.0.6.5-rc1
parent
13de24f707
commit
e96071eb6e
|
@ -904,8 +904,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
firstname, lastname));
|
firstname, lastname));
|
||||||
|
|
||||||
// Establish the avatar's initial appearance
|
// Establish the avatar's initial appearance
|
||||||
|
// TODO: need to add code to do this only when requested
|
||||||
updateUserAppearance(responseData, requestData, userID);
|
// updateUserAppearance(responseData, requestData, userID);
|
||||||
|
|
||||||
responseData["success"] = true;
|
responseData["success"] = true;
|
||||||
responseData["avatar_uuid"] = userID.ToString();
|
responseData["avatar_uuid"] = userID.ToString();
|
||||||
|
@ -1180,32 +1180,40 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
m_log.DebugFormat("[RADMIN] updateUserAppearance");
|
m_log.DebugFormat("[RADMIN] updateUserAppearance");
|
||||||
|
|
||||||
// string dmale = m_config.GetString("default_male", "Default Male");
|
string dmale = m_config.GetString("default_male", "Default Male");
|
||||||
// string dfemale = m_config.GetString("default_female", "Default Female");
|
string dfemale = m_config.GetString("default_female", "Default Female");
|
||||||
// string dneut = m_config.GetString("default_female", "Default Default");
|
string dneut = m_config.GetString("default_female", "Default Default");
|
||||||
// string dmodel = dneut;
|
|
||||||
// string model = dneut;
|
|
||||||
// string dmodel = String.Empty;
|
|
||||||
string model = String.Empty;
|
string model = String.Empty;
|
||||||
|
|
||||||
// Has a gender preference been supplied?
|
// Has a gender preference been supplied?
|
||||||
|
|
||||||
// if (requestData.Contains("gender"))
|
if (requestData.Contains("gender"))
|
||||||
// {
|
{
|
||||||
// if ((string)requestData["gender"] == "f")
|
switch((string)requestData["gender"])
|
||||||
// dmodel = dmale;
|
{
|
||||||
// else
|
case "m" :
|
||||||
// dmodel = dfemale;
|
model = dmale;
|
||||||
// }
|
break;
|
||||||
// else
|
case "f" :
|
||||||
// dmodel = dneut;
|
model = dfemale;
|
||||||
|
break;
|
||||||
|
case "n" :
|
||||||
|
default :
|
||||||
|
model = dneut;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Has an explicit model been specified?
|
// Has an explicit model been specified?
|
||||||
|
|
||||||
if (!requestData.Contains("model"))
|
if (requestData.Contains("model"))
|
||||||
return;
|
|
||||||
model = (string)requestData["model"];
|
model = (string)requestData["model"];
|
||||||
|
|
||||||
|
// No appearance attributes were set
|
||||||
|
|
||||||
|
if (model == String.Empty)
|
||||||
|
return;
|
||||||
|
|
||||||
m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model {1}", userid, model);
|
m_log.DebugFormat("[RADMIN] Setting appearance for avatar {0}, using model {1}", userid, model);
|
||||||
|
|
||||||
string[] nomens = model.Split();
|
string[] nomens = model.Split();
|
||||||
|
@ -1221,23 +1229,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
// Is this the first time one of the default models has been used? Create it if that is the case
|
// Is this the first time one of the default models has been used? Create it if that is the case
|
||||||
// otherwise default to male.
|
// otherwise default to male.
|
||||||
|
|
||||||
// if (mprof == null)
|
|
||||||
// {
|
|
||||||
// if (model != dmale && model != dfemale)
|
|
||||||
// {
|
|
||||||
// m_log.WarnFormat("[RADMIN] Requested model ({0}) not found. Default appearance assumed",
|
|
||||||
// model);
|
|
||||||
// nomens = dmodel.Split();
|
|
||||||
// }
|
|
||||||
// if (createDefaultAvatars())
|
|
||||||
// {
|
|
||||||
// mprof = m_app.CommunicationsManager.UserService.GetUserProfile(nomens[0], nomens[1]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (mprof == null)
|
if (mprof == null)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[RADMIN] User appearance not set for {0}. Model avatar not found : <{1}>", userid, model);
|
m_log.WarnFormat("[RADMIN] Requested model ({0}) not found. Appearance unchanged", model);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1280,6 +1274,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>();
|
Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>();
|
||||||
|
|
||||||
iserv.RequestInventoryForUser(dest, dic.callback);
|
iserv.RequestInventoryForUser(dest, dic.callback);
|
||||||
|
@ -1356,17 +1351,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
throw new Exception("Unable to load both inventories");
|
throw new Exception("Unable to load both inventories");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[RADMIN] Error transferring inventory for {0} : {1}",
|
m_log.WarnFormat("[RADMIN] Error transferring inventory for {0} : {1}",
|
||||||
dest, e.Message);
|
dest, e.Message);
|
||||||
// return new AvatarAppearance();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava);
|
|
||||||
// return ava;
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue