* Appearance patches suite: These patches are applied to allow libomv bots to wear outfits in the future.

This functionality will be upstreamed later.
** Fixed call of new AvatarAppearance without arguments, which caused bots look like clouds of gas
** Added a SendAvatarData in ScenePresence.SetAppearance, which is expected after SetAppearance is run
** Fixed AssetXferUploader: CallbackID wasn't being passed on on multiple packets asset uploads
** Set VisualParams in AvatarAppearance to stop the alien looking bot from spawning and now looks a little better.
*** TODO: Set better VisualParams value then 150 to everything
0.6.5-rc1
Sean Dague 2009-03-25 20:15:46 +00:00
parent b52587ea6c
commit 6323516a83
5 changed files with 47 additions and 29 deletions

View File

@ -196,7 +196,7 @@ namespace OpenSim.Client.Linden
if (agent.Appearance == null)
{
m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname);
agent.Appearance = new AvatarAppearance();
agent.Appearance = new AvatarAppearance(agent.AgentID);
}
if (m_regionsConnector.RegionLoginsEnabled)

View File

@ -38,7 +38,7 @@ namespace OpenSim.Framework
{
// private static readonly ILog m_log
// = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// these are guessed at by the list here -
// http://wiki.secondlife.com/wiki/Avatar_Appearance. We'll
// correct them over time for when were are wrong.
@ -104,127 +104,127 @@ namespace OpenSim.Framework
get { return m_wearables[BODY].ItemID; }
set { m_wearables[BODY].ItemID = value; }
}
public virtual UUID BodyAsset {
get { return m_wearables[BODY].AssetID; }
set { m_wearables[BODY].AssetID = value; }
}
public virtual UUID SkinItem {
get { return m_wearables[SKIN].ItemID; }
set { m_wearables[SKIN].ItemID = value; }
}
public virtual UUID SkinAsset {
get { return m_wearables[SKIN].AssetID; }
set { m_wearables[SKIN].AssetID = value; }
}
public virtual UUID HairItem {
get { return m_wearables[HAIR].ItemID; }
set { m_wearables[HAIR].ItemID = value; }
}
public virtual UUID HairAsset {
get { return m_wearables[HAIR].AssetID; }
set { m_wearables[HAIR].AssetID = value; }
}
public virtual UUID EyesItem {
get { return m_wearables[EYES].ItemID; }
set { m_wearables[EYES].ItemID = value; }
}
public virtual UUID EyesAsset {
get { return m_wearables[EYES].AssetID; }
set { m_wearables[EYES].AssetID = value; }
}
public virtual UUID ShirtItem {
get { return m_wearables[SHIRT].ItemID; }
set { m_wearables[SHIRT].ItemID = value; }
}
public virtual UUID ShirtAsset {
get { return m_wearables[SHIRT].AssetID; }
set { m_wearables[SHIRT].AssetID = value; }
}
public virtual UUID PantsItem {
get { return m_wearables[PANTS].ItemID; }
set { m_wearables[PANTS].ItemID = value; }
}
public virtual UUID PantsAsset {
get { return m_wearables[PANTS].AssetID; }
set { m_wearables[PANTS].AssetID = value; }
}
public virtual UUID ShoesItem {
get { return m_wearables[SHOES].ItemID; }
set { m_wearables[SHOES].ItemID = value; }
}
public virtual UUID ShoesAsset {
get { return m_wearables[SHOES].AssetID; }
set { m_wearables[SHOES].AssetID = value; }
}
public virtual UUID SocksItem {
get { return m_wearables[SOCKS].ItemID; }
set { m_wearables[SOCKS].ItemID = value; }
}
public virtual UUID SocksAsset {
get { return m_wearables[SOCKS].AssetID; }
set { m_wearables[SOCKS].AssetID = value; }
}
public virtual UUID JacketItem {
get { return m_wearables[JACKET].ItemID; }
set { m_wearables[JACKET].ItemID = value; }
}
public virtual UUID JacketAsset {
get { return m_wearables[JACKET].AssetID; }
set { m_wearables[JACKET].AssetID = value; }
}
public virtual UUID GlovesItem {
get { return m_wearables[GLOVES].ItemID; }
set { m_wearables[GLOVES].ItemID = value; }
}
public virtual UUID GlovesAsset {
get { return m_wearables[GLOVES].AssetID; }
set { m_wearables[GLOVES].AssetID = value; }
}
public virtual UUID UnderShirtItem {
get { return m_wearables[UNDERSHIRT].ItemID; }
set { m_wearables[UNDERSHIRT].ItemID = value; }
}
public virtual UUID UnderShirtAsset {
get { return m_wearables[UNDERSHIRT].AssetID; }
set { m_wearables[UNDERSHIRT].AssetID = value; }
}
public virtual UUID UnderPantsItem {
get { return m_wearables[UNDERPANTS].ItemID; }
set { m_wearables[UNDERPANTS].ItemID = value; }
}
public virtual UUID UnderPantsAsset {
get { return m_wearables[UNDERPANTS].AssetID; }
set { m_wearables[UNDERPANTS].AssetID = value; }
}
public virtual UUID SkirtItem {
get { return m_wearables[SKIRT].ItemID; }
set { m_wearables[SKIRT].ItemID = value; }
}
public virtual UUID SkirtAsset {
get { return m_wearables[SKIRT].AssetID; }
set { m_wearables[SKIRT].AssetID = value; }
@ -242,6 +242,15 @@ namespace OpenSim.Framework
m_wearables[PANTS].ItemID = PANTS_ITEM;
}
public virtual void SetDefaultParams(byte[] vparams)
{
// TODO: Figure out better values then 'fat scientist 150' or 'alien 0'
for (int i = 0; i < VISUALPARAM_COUNT; i++)
{
vparams[i] = 150;
}
}
protected Primitive.TextureEntry m_texture;
public virtual Primitive.TextureEntry Texture
@ -280,6 +289,8 @@ namespace OpenSim.Framework
m_serial = 0;
m_owner = owner;
m_visualparams = new byte[VISUALPARAM_COUNT];
// This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist
SetDefaultParams(m_visualparams);
SetDefaultWearables();
m_texture = GetDefaultTexture();
}

View File

@ -320,7 +320,7 @@ namespace OpenSim.Region.Communications.Local
else
{
m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname);
agent.Appearance = new AvatarAppearance();
agent.Appearance = new AvatarAppearance(agent.AgentID);
}
TriggerExpectUser(regionHandle, agent);

View File

@ -43,6 +43,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
private UUID InventFolder = UUID.Zero;
private sbyte invType = 0;
private bool m_createItem = false;
private uint m_createItemCallback = 0;
private string m_description = String.Empty;
private bool m_dumpAssetToFile;
private bool m_finished = false;
@ -148,7 +149,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
m_finished = true;
if (m_createItem)
{
DoCreateItem(0);
DoCreateItem(m_createItemCallback);
}
else if (m_storeLocal)
{
@ -205,6 +206,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
else
{
m_createItem = true; //set flag so the inventory item is created when upload is complete
m_createItemCallback = callbackID;
}
}
}

View File

@ -2389,6 +2389,11 @@ namespace OpenSim.Region.Framework.Scenes
UpdateMovementAnimations();
m_startAnimationSet = true;
}
Quaternion rot = m_bodyRot;
m_controllingClient.SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
m_pos, m_appearance.Texture.ToBytes(), m_parentID, rot);
}
public void SetWearable(int wearableId, AvatarWearable wearable)