Clean out some crufty in AvatarFactoryModule

Fix RequestUpdateInventoryItem so that asset changes
generate a new asset, which is needed for editing
appearance to do the right thing.  Persistant appearance
seems to work after this, except you need to rebake textures
some times.
This commit is contained in:
Sean Dague
2008-05-21 20:18:40 +00:00
parent 53bcf2139e
commit 9389429ed3
3 changed files with 18 additions and 193 deletions

View File

@@ -347,6 +347,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
if (asset != null && asset.FullID == assetID)
{
// Assets never get updated, new ones get created
asset.FullID = LLUUID.Random();
asset.Name = item.Name;
asset.Description = item.Description;
asset.InvType = (sbyte) item.InvType;

View File

@@ -1456,17 +1456,7 @@ namespace OpenSim.Region.Environment.Scenes
SendFullUpdateToAllClients();
SendAppearanceToAllOtherAgents();
SendOwnAppearance();
}
public void SetWearable(IClientAPI client, int wearableId, AvatarWearable wearable)
{
m_log.Info("[APPEARANCE] Setting wearable with client, wearableid, wearable");
m_appearance.SetWearable(wearableId, wearable);
m_scene.CommsManager.UserService.UpdateUserAppearance(client.AgentId, m_appearance);
client.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
}
}
/// <summary>
///
@@ -1476,6 +1466,11 @@ namespace OpenSim.Region.Environment.Scenes
{
m_log.Info("[APPEARANCE] Sending Own Appearance");
ControllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
ControllingClient.SendAppearance(
m_appearance.Owner,
m_appearance.VisualParams,
m_appearance.Texture.ToBytes()
);
}
/// <summary>
@@ -1483,6 +1478,7 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary>
public void SendAppearanceToAllOtherAgents()
{
m_log.Info("[APPEARANCE] Sending Appearance to All Other Agents");
m_perfMonMS=System.Environment.TickCount;
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
@@ -1506,7 +1502,7 @@ namespace OpenSim.Region.Environment.Scenes
public void SetAppearance(byte[] texture, List<byte> visualParam)
{
m_log.Warn("[APPEARANCE] Setting Appearance");
m_log.Info("[APPEARANCE] Setting Appearance");
m_appearance.SetAppearance(texture, visualParam);
SetHeight(m_appearance.AvatarHeight);
m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
@@ -1517,9 +1513,10 @@ namespace OpenSim.Region.Environment.Scenes
public void SetWearable(int wearableId, AvatarWearable wearable)
{
m_log.Warn("[APPEARANCE] Setting Wearable");
m_log.Info("[APPEARANCE] Setting Wearable");
m_appearance.SetWearable(wearableId, wearable);
m_scene.CommsManager.UserService.UpdateUserAppearance(m_controllingClient.AgentId, m_appearance);
m_controllingClient.SendWearables(m_appearance.Wearables, m_appearance.Serial++);
}
// Because appearance setting is in a module, we actually need