Merge branch 'master' into mantis5110
Conflicts: OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.csviewer-2-initial-appearance
commit
e371d3208c
|
@ -1510,11 +1510,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
for (int i=0; i<wearables.Length; i++)
|
for (int i=0; i<wearables.Length; i++)
|
||||||
{
|
{
|
||||||
if (inventoryMap.ContainsKey(wearables[i].ItemID))
|
if (inventoryMap.ContainsKey(wearables[i][0].ItemID))
|
||||||
{
|
{
|
||||||
AvatarWearable wearable = new AvatarWearable();
|
AvatarWearable wearable = new AvatarWearable();
|
||||||
wearable.AssetID = wearables[i].AssetID;
|
wearable.Wear(inventoryMap[wearables[i][0].ItemID],
|
||||||
wearable.ItemID = inventoryMap[wearables[i].ItemID];
|
wearables[i][0].AssetID);
|
||||||
avatarAppearance.SetWearable(i, wearable);
|
avatarAppearance.SetWearable(i, wearable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1568,10 +1568,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
for (int i=0; i<wearables.Length; i++)
|
for (int i=0; i<wearables.Length; i++)
|
||||||
{
|
{
|
||||||
wearable = wearables[i];
|
wearable = wearables[i];
|
||||||
if (wearable.ItemID != UUID.Zero)
|
if (wearable[0].ItemID != UUID.Zero)
|
||||||
{
|
{
|
||||||
// Get inventory item and copy it
|
// Get inventory item and copy it
|
||||||
InventoryItemBase item = new InventoryItemBase(wearable.ItemID, source);
|
InventoryItemBase item = new InventoryItemBase(wearable[0].ItemID, source);
|
||||||
item = inventoryService.GetItem(item);
|
item = inventoryService.GetItem(item);
|
||||||
|
|
||||||
if (item != null)
|
if (item != null)
|
||||||
|
@ -1602,13 +1602,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
// Wear item
|
// Wear item
|
||||||
AvatarWearable newWearable = new AvatarWearable();
|
AvatarWearable newWearable = new AvatarWearable();
|
||||||
newWearable.AssetID = wearable.AssetID;
|
newWearable.Wear(destinationItem.ID, wearable[0].AssetID);
|
||||||
newWearable.ItemID = destinationItem.ID;
|
|
||||||
avatarAppearance.SetWearable(i, newWearable);
|
avatarAppearance.SetWearable(i, newWearable);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", wearable.ItemID, destinationFolder.ID);
|
m_log.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", wearable[0].ItemID, destinationFolder.ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2057,8 +2056,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
{
|
{
|
||||||
if (select && (GetStringAttribute(item, "wear", "false") == "true"))
|
if (select && (GetStringAttribute(item, "wear", "false") == "true"))
|
||||||
{
|
{
|
||||||
avatarAppearance.Wearables[inventoryItem.Flags].ItemID = inventoryItem.ID;
|
avatarAppearance.Wearables[inventoryItem.Flags].Wear(inventoryItem.ID, inventoryItem.AssetID);
|
||||||
avatarAppearance.Wearables[inventoryItem.Flags].AssetID = inventoryItem.AssetID;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -499,6 +499,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
indata = true;
|
indata = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
/*
|
||||||
case "Body" :
|
case "Body" :
|
||||||
if (xml.MoveToAttribute("Item"))
|
if (xml.MoveToAttribute("Item"))
|
||||||
{
|
{
|
||||||
|
@ -655,6 +656,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
indata = true;
|
indata = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
case "Attachment" :
|
case "Attachment" :
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -749,6 +751,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString());
|
rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString());
|
||||||
rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString());
|
rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString());
|
||||||
|
|
||||||
|
/*
|
||||||
FormatPart(rdata, "Body", rdata.userAppearance.BodyItem, rdata.userAppearance.BodyAsset);
|
FormatPart(rdata, "Body", rdata.userAppearance.BodyItem, rdata.userAppearance.BodyAsset);
|
||||||
FormatPart(rdata, "Skin", rdata.userAppearance.SkinItem, rdata.userAppearance.SkinAsset);
|
FormatPart(rdata, "Skin", rdata.userAppearance.SkinItem, rdata.userAppearance.SkinAsset);
|
||||||
FormatPart(rdata, "Hair", rdata.userAppearance.HairItem, rdata.userAppearance.HairAsset);
|
FormatPart(rdata, "Hair", rdata.userAppearance.HairItem, rdata.userAppearance.HairAsset);
|
||||||
|
@ -765,7 +768,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
|
|
||||||
FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset);
|
FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset);
|
||||||
FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset);
|
FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset);
|
||||||
|
*/
|
||||||
Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId);
|
Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId);
|
||||||
|
|
||||||
rdata.writer.WriteStartElement("Attachments");
|
rdata.writer.WriteStartElement("Attachments");
|
||||||
|
|
|
@ -212,41 +212,10 @@ namespace OpenSim.Framework
|
||||||
args["mac"] = OSD.FromString(Mac);
|
args["mac"] = OSD.FromString(Mac);
|
||||||
args["id0"] = OSD.FromString(Id0);
|
args["id0"] = OSD.FromString(Id0);
|
||||||
|
|
||||||
// Eventually this code should be deprecated, use full appearance
|
|
||||||
// packing in packed_appearance
|
|
||||||
if (Appearance != null)
|
if (Appearance != null)
|
||||||
{
|
{
|
||||||
args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
|
args["appearance_serial"] = OSD.FromInteger(Appearance.Serial);
|
||||||
|
|
||||||
//System.Console.WriteLine("XXX Before packing Wearables");
|
|
||||||
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
|
|
||||||
{
|
|
||||||
OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2);
|
|
||||||
foreach (AvatarWearable awear in Appearance.Wearables)
|
|
||||||
{
|
|
||||||
wears.Add(OSD.FromUUID(awear.ItemID));
|
|
||||||
wears.Add(OSD.FromUUID(awear.AssetID));
|
|
||||||
//System.Console.WriteLine("XXX ItemID=" + awear.ItemID + " assetID=" + awear.AssetID);
|
|
||||||
}
|
|
||||||
args["wearables"] = wears;
|
|
||||||
}
|
|
||||||
|
|
||||||
//System.Console.WriteLine("XXX Before packing Attachments");
|
|
||||||
List<AvatarAttachment> attachments = Appearance.GetAttachments();
|
|
||||||
if ((attachments != null) && (attachments.Count > 0))
|
|
||||||
{
|
|
||||||
OSDArray attachs = new OSDArray(attachments.Count);
|
|
||||||
foreach (AvatarAttachment attach in attachments)
|
|
||||||
{
|
|
||||||
attachs.Add(attach.Pack());
|
|
||||||
//System.Console.WriteLine("XXX att.pt=" + kvp.Key + "; itemID=" + kvp.Value[0] + "; assetID=" + kvp.Value[1]);
|
|
||||||
}
|
|
||||||
args["attachments"] = attachs;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Appearance != null)
|
|
||||||
{
|
|
||||||
OSDMap appmap = Appearance.Pack();
|
OSDMap appmap = Appearance.Pack();
|
||||||
args["packed_appearance"] = appmap;
|
args["packed_appearance"] = appmap;
|
||||||
}
|
}
|
||||||
|
@ -346,28 +315,6 @@ namespace OpenSim.Framework
|
||||||
if (args["appearance_serial"] != null)
|
if (args["appearance_serial"] != null)
|
||||||
Appearance.Serial = args["appearance_serial"].AsInteger();
|
Appearance.Serial = args["appearance_serial"].AsInteger();
|
||||||
|
|
||||||
if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
|
|
||||||
{
|
|
||||||
OSDArray wears = (OSDArray)(args["wearables"]);
|
|
||||||
for (int i = 0; i < wears.Count / 2; i++)
|
|
||||||
{
|
|
||||||
AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID());
|
|
||||||
Appearance.SetWearable(i,awear);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array)
|
|
||||||
{
|
|
||||||
OSDArray attachs = (OSDArray)(args["attachments"]);
|
|
||||||
foreach (OSD o in attachs)
|
|
||||||
{
|
|
||||||
if (o.Type == OSDType.Map)
|
|
||||||
{
|
|
||||||
Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
||||||
{
|
{
|
||||||
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
||||||
|
|
|
@ -35,104 +35,6 @@ using log4net;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
// A special dictionary for avatar appearance
|
|
||||||
public struct LayerItem
|
|
||||||
{
|
|
||||||
public UUID ItemID;
|
|
||||||
public UUID AssetID;
|
|
||||||
|
|
||||||
public LayerItem(UUID itemID, UUID assetID)
|
|
||||||
{
|
|
||||||
ItemID = itemID;
|
|
||||||
AssetID = assetID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Layer
|
|
||||||
{
|
|
||||||
protected int m_layerType;
|
|
||||||
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
|
||||||
protected List<UUID> m_ids = new List<UUID>();
|
|
||||||
|
|
||||||
public Layer(int type)
|
|
||||||
{
|
|
||||||
m_layerType = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int LayerType
|
|
||||||
{
|
|
||||||
get { return m_layerType; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Count
|
|
||||||
{
|
|
||||||
get { return m_ids.Count; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Add(UUID itemID, UUID assetID)
|
|
||||||
{
|
|
||||||
if (m_items.ContainsKey(itemID))
|
|
||||||
return;
|
|
||||||
if (m_ids.Count >= 5)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_ids.Add(itemID);
|
|
||||||
m_items[itemID] = assetID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Wear(UUID itemID, UUID assetID)
|
|
||||||
{
|
|
||||||
Clear();
|
|
||||||
Add(itemID, assetID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
m_ids.Clear();
|
|
||||||
m_items.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveItem(UUID itemID)
|
|
||||||
{
|
|
||||||
if (m_items.ContainsKey(itemID))
|
|
||||||
{
|
|
||||||
m_ids.Remove(itemID);
|
|
||||||
m_items.Remove(itemID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveAsset(UUID assetID)
|
|
||||||
{
|
|
||||||
UUID itemID = UUID.Zero;
|
|
||||||
|
|
||||||
foreach (KeyValuePair<UUID, UUID> kvp in m_items)
|
|
||||||
{
|
|
||||||
if (kvp.Value == assetID)
|
|
||||||
{
|
|
||||||
itemID = kvp.Key;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (itemID != UUID.Zero)
|
|
||||||
{
|
|
||||||
m_ids.Remove(itemID);
|
|
||||||
m_items.Remove(itemID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public LayerItem this [int idx]
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (idx >= m_ids.Count || idx < 0)
|
|
||||||
return new LayerItem(UUID.Zero, UUID.Zero);
|
|
||||||
|
|
||||||
return new LayerItem(m_ids[idx], m_items[m_ids[idx]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains the Avatar's Appearance and methods to manipulate the appearance.
|
/// Contains the Avatar's Appearance and methods to manipulate the appearance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -184,136 +86,6 @@ namespace OpenSim.Framework
|
||||||
set { m_wearables = value; }
|
set { m_wearables = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual UUID BodyItem {
|
|
||||||
get { return m_wearables[AvatarWearable.BODY].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.BODY].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID BodyAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.BODY].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.BODY].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID SkinItem {
|
|
||||||
get { return m_wearables[AvatarWearable.SKIN].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.SKIN].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID SkinAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.SKIN].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.SKIN].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID HairItem {
|
|
||||||
get { return m_wearables[AvatarWearable.HAIR].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.HAIR].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID HairAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.HAIR].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.HAIR].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID EyesItem {
|
|
||||||
get { return m_wearables[AvatarWearable.EYES].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.EYES].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID EyesAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.EYES].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.EYES].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID ShirtItem {
|
|
||||||
get { return m_wearables[AvatarWearable.SHIRT].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.SHIRT].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID ShirtAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.SHIRT].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.SHIRT].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID PantsItem {
|
|
||||||
get { return m_wearables[AvatarWearable.PANTS].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.PANTS].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID PantsAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.PANTS].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.PANTS].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID ShoesItem {
|
|
||||||
get { return m_wearables[AvatarWearable.SHOES].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.SHOES].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID ShoesAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.SHOES].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.SHOES].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID SocksItem {
|
|
||||||
get { return m_wearables[AvatarWearable.SOCKS].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.SOCKS].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID SocksAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.SOCKS].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.SOCKS].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID JacketItem {
|
|
||||||
get { return m_wearables[AvatarWearable.JACKET].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.JACKET].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID JacketAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.JACKET].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.JACKET].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID GlovesItem {
|
|
||||||
get { return m_wearables[AvatarWearable.GLOVES].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.GLOVES].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID GlovesAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.GLOVES].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.GLOVES].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID UnderShirtItem {
|
|
||||||
get { return m_wearables[AvatarWearable.UNDERSHIRT].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.UNDERSHIRT].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID UnderShirtAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.UNDERSHIRT].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.UNDERSHIRT].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID UnderPantsItem {
|
|
||||||
get { return m_wearables[AvatarWearable.UNDERPANTS].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.UNDERPANTS].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID UnderPantsAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.UNDERPANTS].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.UNDERPANTS].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID SkirtItem {
|
|
||||||
get { return m_wearables[AvatarWearable.SKIRT].ItemID; }
|
|
||||||
set { m_wearables[AvatarWearable.SKIRT].ItemID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual UUID SkirtAsset {
|
|
||||||
get { return m_wearables[AvatarWearable.SKIRT].AssetID; }
|
|
||||||
set { m_wearables[AvatarWearable.SKIRT].AssetID = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual float AvatarHeight
|
public virtual float AvatarHeight
|
||||||
{
|
{
|
||||||
get { return m_avatarHeight; }
|
get { return m_avatarHeight; }
|
||||||
|
@ -339,6 +111,10 @@ namespace OpenSim.Framework
|
||||||
SetDefaultParams();
|
SetDefaultParams();
|
||||||
SetHeight();
|
SetHeight();
|
||||||
|
|
||||||
|
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
||||||
|
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
|
||||||
|
m_wearables[i] = new AvatarWearable();
|
||||||
|
|
||||||
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,10 +176,11 @@ namespace OpenSim.Framework
|
||||||
m_serial = appearance.Serial;
|
m_serial = appearance.Serial;
|
||||||
m_owner = appearance.Owner;
|
m_owner = appearance.Owner;
|
||||||
|
|
||||||
m_wearables = null;
|
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
||||||
|
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
|
||||||
|
m_wearables[i] = new AvatarWearable();
|
||||||
if (appearance.Wearables != null)
|
if (appearance.Wearables != null)
|
||||||
{
|
{
|
||||||
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; //should be 13 of these
|
|
||||||
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||||
SetWearable(i,appearance.Wearables[i]);
|
SetWearable(i,appearance.Wearables[i]);
|
||||||
}
|
}
|
||||||
|
@ -547,7 +324,9 @@ namespace OpenSim.Framework
|
||||||
// DEBUG ON
|
// DEBUG ON
|
||||||
// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
|
// m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID);
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
m_wearables[wearableId] = new AvatarWearable(wearable.ItemID,wearable.AssetID);
|
m_wearables[wearableId].Clear();
|
||||||
|
for (int i = 0 ; i < wearable.Count ; i++)
|
||||||
|
m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -563,7 +342,10 @@ namespace OpenSim.Framework
|
||||||
s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID);
|
s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID);
|
||||||
|
|
||||||
foreach (AvatarWearable awear in m_wearables)
|
foreach (AvatarWearable awear in m_wearables)
|
||||||
s += String.Format("Wearable: item={0}, asset={1}\n",awear.ItemID,awear.AssetID);
|
{
|
||||||
|
for ( int i = 0 ; i < awear.Count ; i++ )
|
||||||
|
s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID);
|
||||||
|
}
|
||||||
|
|
||||||
s += "Visual Params: ";
|
s += "Visual Params: ";
|
||||||
for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++)
|
for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++)
|
||||||
|
@ -733,7 +515,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
OSDArray wears = (OSDArray)(data["wearables"]);
|
OSDArray wears = (OSDArray)(data["wearables"]);
|
||||||
for (int i = 0; i < wears.Count; i++)
|
for (int i = 0; i < wears.Count; i++)
|
||||||
m_wearables[i] = new AvatarWearable((OSDMap)wears[i]);
|
m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,11 +26,24 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.StructuredData;
|
using OpenMetaverse.StructuredData;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
|
public struct WearableItem
|
||||||
|
{
|
||||||
|
public UUID ItemID;
|
||||||
|
public UUID AssetID;
|
||||||
|
|
||||||
|
public WearableItem(UUID itemID, UUID assetID)
|
||||||
|
{
|
||||||
|
ItemID = itemID;
|
||||||
|
AssetID = assetID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class AvatarWearable
|
public class AvatarWearable
|
||||||
{
|
{
|
||||||
// these are guessed at by the list here -
|
// these are guessed at by the list here -
|
||||||
|
@ -49,8 +62,10 @@ namespace OpenSim.Framework
|
||||||
public static readonly int UNDERSHIRT = 10;
|
public static readonly int UNDERSHIRT = 10;
|
||||||
public static readonly int UNDERPANTS = 11;
|
public static readonly int UNDERPANTS = 11;
|
||||||
public static readonly int SKIRT = 12;
|
public static readonly int SKIRT = 12;
|
||||||
|
public static readonly int ALPHA = 13;
|
||||||
|
public static readonly int TATTOO = 14;
|
||||||
|
|
||||||
public static readonly int MAX_WEARABLES = 13;
|
public static readonly int MAX_WEARABLES = 15;
|
||||||
|
|
||||||
public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
|
public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
|
||||||
public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
|
public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
|
||||||
|
@ -67,68 +82,158 @@ namespace OpenSim.Framework
|
||||||
public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
|
public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
|
||||||
public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
|
public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
|
||||||
|
|
||||||
public UUID AssetID;
|
public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8");
|
||||||
public UUID ItemID;
|
public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594");
|
||||||
|
|
||||||
|
public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1");
|
||||||
|
public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007");
|
||||||
|
|
||||||
|
|
||||||
|
protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>();
|
||||||
|
protected List<UUID> m_ids = new List<UUID>();
|
||||||
|
|
||||||
public AvatarWearable()
|
public AvatarWearable()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public AvatarWearable(UUID itemId, UUID assetId)
|
public AvatarWearable(UUID itemID, UUID assetID)
|
||||||
{
|
{
|
||||||
AssetID = assetId;
|
Wear(itemID, assetID);
|
||||||
ItemID = itemId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AvatarWearable(OSDMap args)
|
public AvatarWearable(OSDArray args)
|
||||||
{
|
{
|
||||||
Unpack(args);
|
Unpack(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public OSDMap Pack()
|
public OSD Pack()
|
||||||
{
|
{
|
||||||
OSDMap weardata = new OSDMap();
|
OSDArray wearlist = new OSDArray();
|
||||||
weardata["item"] = OSD.FromUUID(ItemID);
|
|
||||||
weardata["asset"] = OSD.FromUUID(AssetID);
|
|
||||||
|
|
||||||
return weardata;
|
foreach (UUID id in m_ids)
|
||||||
|
{
|
||||||
|
OSDMap weardata = new OSDMap();
|
||||||
|
weardata["item"] = OSD.FromUUID(id);
|
||||||
|
weardata["asset"] = OSD.FromUUID(m_items[id]);
|
||||||
|
wearlist.Add(weardata);
|
||||||
|
}
|
||||||
|
|
||||||
|
return wearlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Unpack(OSDMap args)
|
public void Unpack(OSDArray args)
|
||||||
{
|
{
|
||||||
ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero;
|
Clear();
|
||||||
AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero;
|
|
||||||
|
foreach (OSDMap weardata in args)
|
||||||
|
{
|
||||||
|
Add(weardata["item"].AsUUID(), weardata["asset"].AsUUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Count
|
||||||
|
{
|
||||||
|
get { return m_ids.Count; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Add(UUID itemID, UUID assetID)
|
||||||
|
{
|
||||||
|
if (itemID == UUID.Zero)
|
||||||
|
return;
|
||||||
|
if (m_items.ContainsKey(itemID))
|
||||||
|
{
|
||||||
|
m_items[itemID] = assetID;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (m_ids.Count >= 5)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_ids.Add(itemID);
|
||||||
|
m_items[itemID] = assetID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Wear(UUID itemID, UUID assetID)
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
Add(itemID, assetID);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Clear()
|
||||||
|
{
|
||||||
|
m_ids.Clear();
|
||||||
|
m_items.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveItem(UUID itemID)
|
||||||
|
{
|
||||||
|
if (m_items.ContainsKey(itemID))
|
||||||
|
{
|
||||||
|
m_ids.Remove(itemID);
|
||||||
|
m_items.Remove(itemID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveAsset(UUID assetID)
|
||||||
|
{
|
||||||
|
UUID itemID = UUID.Zero;
|
||||||
|
|
||||||
|
foreach (KeyValuePair<UUID, UUID> kvp in m_items)
|
||||||
|
{
|
||||||
|
if (kvp.Value == assetID)
|
||||||
|
{
|
||||||
|
itemID = kvp.Key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemID != UUID.Zero)
|
||||||
|
{
|
||||||
|
m_ids.Remove(itemID);
|
||||||
|
m_items.Remove(itemID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public WearableItem this [int idx]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (idx >= m_ids.Count || idx < 0)
|
||||||
|
return new WearableItem(UUID.Zero, UUID.Zero);
|
||||||
|
|
||||||
|
return new WearableItem(m_ids[idx], m_items[m_ids[idx]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AvatarWearable[] DefaultWearables
|
public static AvatarWearable[] DefaultWearables
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 13 of these
|
AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
|
||||||
for (int i = 0; i < MAX_WEARABLES; i++)
|
for (int i = 0; i < MAX_WEARABLES; i++)
|
||||||
{
|
{
|
||||||
defaultWearables[i] = new AvatarWearable();
|
defaultWearables[i] = new AvatarWearable();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Body
|
// Body
|
||||||
defaultWearables[0].ItemID = DEFAULT_BODY_ITEM;
|
defaultWearables[BODY].Add(DEFAULT_BODY_ITEM, DEFAULT_BODY_ASSET);
|
||||||
defaultWearables[0].AssetID = DEFAULT_BODY_ASSET;
|
|
||||||
|
|
||||||
// Hair
|
// Hair
|
||||||
defaultWearables[2].ItemID = DEFAULT_HAIR_ITEM;
|
defaultWearables[HAIR].Add(DEFAULT_HAIR_ITEM, DEFAULT_HAIR_ASSET);
|
||||||
defaultWearables[2].AssetID = DEFAULT_HAIR_ASSET;
|
|
||||||
|
|
||||||
// Skin
|
// Skin
|
||||||
defaultWearables[1].ItemID = DEFAULT_SKIN_ITEM;
|
defaultWearables[SKIN].Add(DEFAULT_SKIN_ITEM, DEFAULT_SKIN_ASSET);
|
||||||
defaultWearables[1].AssetID = DEFAULT_SKIN_ASSET;
|
|
||||||
|
|
||||||
// Shirt
|
// Shirt
|
||||||
defaultWearables[4].ItemID = DEFAULT_SHIRT_ITEM;
|
defaultWearables[SHIRT].Add(DEFAULT_SHIRT_ITEM, DEFAULT_SHIRT_ASSET);
|
||||||
defaultWearables[4].AssetID = DEFAULT_SHIRT_ASSET;
|
|
||||||
|
|
||||||
// Pants
|
// Pants
|
||||||
defaultWearables[5].ItemID = DEFAULT_PANTS_ITEM;
|
defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET);
|
||||||
defaultWearables[5].AssetID = DEFAULT_PANTS_ASSET;
|
|
||||||
|
// Alpha
|
||||||
|
defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET);
|
||||||
|
|
||||||
|
// Tattoo
|
||||||
|
defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET);
|
||||||
|
|
||||||
return defaultWearables;
|
return defaultWearables;
|
||||||
}
|
}
|
||||||
|
|
|
@ -414,12 +414,10 @@ namespace OpenSim.Framework
|
||||||
// We might not pass this in all cases...
|
// We might not pass this in all cases...
|
||||||
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
|
if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0))
|
||||||
{
|
{
|
||||||
OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2);
|
OSDArray wears = new OSDArray(Appearance.Wearables.Length);
|
||||||
foreach (AvatarWearable awear in Appearance.Wearables)
|
foreach (AvatarWearable awear in Appearance.Wearables)
|
||||||
{
|
wears.Add(awear.Pack());
|
||||||
wears.Add(OSD.FromUUID(awear.ItemID));
|
|
||||||
wears.Add(OSD.FromUUID(awear.AssetID));
|
|
||||||
}
|
|
||||||
args["wearables"] = wears;
|
args["wearables"] = wears;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -592,7 +590,7 @@ namespace OpenSim.Framework
|
||||||
OSDArray wears = (OSDArray)(args["wearables"]);
|
OSDArray wears = (OSDArray)(args["wearables"]);
|
||||||
for (int i = 0; i < wears.Count / 2; i++)
|
for (int i = 0; i < wears.Count / 2; i++)
|
||||||
{
|
{
|
||||||
AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID());
|
AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]);
|
||||||
Appearance.SetWearable(i,awear);
|
Appearance.SetWearable(i,awear);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,6 @@ namespace OpenSim
|
||||||
/// of the code that is too old.
|
/// of the code that is too old.
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
public readonly static int MajorInterfaceVersion = 6;
|
public readonly static int MajorInterfaceVersion = 7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3387,20 +3387,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
aw.AgentData.SerialNum = (uint)serial;
|
aw.AgentData.SerialNum = (uint)serial;
|
||||||
aw.AgentData.SessionID = m_sessionId;
|
aw.AgentData.SessionID = m_sessionId;
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = 0; i < wearables.Length; i++)
|
||||||
|
count += wearables[i].Count;
|
||||||
|
|
||||||
// TODO: don't create new blocks if recycling an old packet
|
// TODO: don't create new blocks if recycling an old packet
|
||||||
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
|
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count];
|
||||||
AgentWearablesUpdatePacket.WearableDataBlock awb;
|
AgentWearablesUpdatePacket.WearableDataBlock awb;
|
||||||
|
int idx = 0;
|
||||||
for (int i = 0; i < wearables.Length; i++)
|
for (int i = 0; i < wearables.Length; i++)
|
||||||
{
|
{
|
||||||
awb = new AgentWearablesUpdatePacket.WearableDataBlock();
|
for (int j = 0; j < wearables[i].Count; j++)
|
||||||
awb.WearableType = (byte)i;
|
{
|
||||||
awb.AssetID = wearables[i].AssetID;
|
awb = new AgentWearablesUpdatePacket.WearableDataBlock();
|
||||||
awb.ItemID = wearables[i].ItemID;
|
awb.WearableType = (byte)i;
|
||||||
aw.WearableData[i] = awb;
|
awb.AssetID = wearables[i][j].AssetID;
|
||||||
|
awb.ItemID = wearables[i][j].ItemID;
|
||||||
|
aw.WearableData[idx] = awb;
|
||||||
|
idx++;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
// "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}",
|
||||||
// awb.ItemID, awb.AssetID, i, Name);
|
// awb.ItemID, awb.AssetID, i, Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(aw, ThrottleOutPacketType.Task);
|
OutPacket(aw, ThrottleOutPacketType.Task);
|
||||||
|
|
|
@ -183,7 +183,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
IConfig config = configSource.Configs["ClientStack.LindenUDP"];
|
IConfig config = configSource.Configs["ClientStack.LindenUDP"];
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
m_asyncPacketHandling = config.GetBoolean("async_packet_handling", false);
|
m_asyncPacketHandling = config.GetBoolean("async_packet_handling", true);
|
||||||
m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
|
m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0);
|
||||||
sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
|
sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0);
|
||||||
|
|
||||||
|
|
|
@ -382,27 +382,22 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
{
|
{
|
||||||
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||||
{
|
{
|
||||||
if (appearance.Wearables[i].ItemID == UUID.Zero)
|
for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ )
|
||||||
{
|
{
|
||||||
appearance.Wearables[i].AssetID = UUID.Zero;
|
InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID);
|
|
||||||
baseItem = invService.GetItem(baseItem);
|
baseItem = invService.GetItem(baseItem);
|
||||||
|
|
||||||
if (baseItem != null)
|
if (baseItem != null)
|
||||||
{
|
{
|
||||||
appearance.Wearables[i].AssetID = baseItem.AssetID;
|
appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default",
|
"[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default",
|
||||||
appearance.Wearables[i].ItemID, (WearableType)i);
|
appearance.Wearables[i][j].ItemID, (WearableType)i);
|
||||||
|
|
||||||
appearance.Wearables[i].ItemID = UUID.Zero;
|
appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID);
|
||||||
appearance.Wearables[i].AssetID = UUID.Zero;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,28 +173,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
|
|
||||||
InventoryCollection contents
|
InventoryCollection contents
|
||||||
= m_scene.InventoryService.GetFolderContent(inventoryFolder.Owner, inventoryFolder.ID);
|
= m_scene.InventoryService.GetFolderContent(inventoryFolder.Owner, inventoryFolder.ID);
|
||||||
//List<InventoryFolderImpl> childFolders = inventoryFolder.RequestListOfFolderImpls();
|
|
||||||
//List<InventoryItemBase> items = inventoryFolder.RequestListOfItems();
|
|
||||||
|
|
||||||
/*
|
|
||||||
Dictionary identicalFolderNames = new Dictionary<string, int>();
|
|
||||||
|
|
||||||
foreach (InventoryFolderImpl folder in inventories)
|
|
||||||
{
|
|
||||||
if (!identicalFolderNames.ContainsKey(folder.Name))
|
|
||||||
identicalFolderNames[folder.Name] = 0;
|
|
||||||
else
|
|
||||||
identicalFolderNames[folder.Name] = identicalFolderNames[folder.Name]++;
|
|
||||||
|
|
||||||
int folderNameNumber = identicalFolderName[folder.Name];
|
|
||||||
|
|
||||||
SaveInvDir(
|
|
||||||
folder,
|
|
||||||
string.Format(
|
|
||||||
"{0}{1}{2}/",
|
|
||||||
path, ArchiveConstants.INVENTORY_NODE_NAME_COMPONENT_SEPARATOR, folderNameNumber));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
foreach (InventoryFolderBase childFolder in contents.Folders)
|
foreach (InventoryFolderBase childFolder in contents.Folders)
|
||||||
{
|
{
|
||||||
|
|
|
@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
GridRegion finalDestination = GetFinalDestination(reg);
|
GridRegion finalDestination = GetFinalDestination(reg);
|
||||||
if (finalDestination == null)
|
if (finalDestination == null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent.");
|
m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Final destination is having problems. Unable to teleport agent.");
|
||||||
sp.ControllingClient.SendTeleportFailed("Problem at destination");
|
sp.ControllingClient.SendTeleportFailed("Problem at destination");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0}\n{1}", e.Message, e.StackTrace);
|
m_log.WarnFormat("[ENTITY TRANSFER MODULE]: Exception on teleport: {0}\n{1}", e.Message, e.StackTrace);
|
||||||
sp.ControllingClient.SendTeleportFailed("Internal error");
|
sp.ControllingClient.SendTeleportFailed("Internal error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -398,7 +398,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID);
|
"[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, sp.UUID);
|
||||||
|
|
||||||
|
|
||||||
if (eq != null)
|
if (eq != null)
|
||||||
{
|
{
|
||||||
eq.TeleportFinishEvent(destinationHandle, 13, endPoint,
|
eq.TeleportFinishEvent(destinationHandle, 13, endPoint,
|
||||||
|
@ -558,6 +557,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
client.SendTeleportFailed("Your home region could not be found.");
|
client.SendTeleportFailed("Your home region could not be found.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})",
|
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: User's home region is {0} {1} ({2}-{3})",
|
||||||
regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize);
|
regionInfo.RegionName, regionInfo.RegionID, regionInfo.RegionLocX / Constants.RegionSize, regionInfo.RegionLocY / Constants.RegionSize);
|
||||||
|
|
||||||
|
@ -1162,7 +1162,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
Utils.LongToUInts(reg.RegionHandle, out x, out y);
|
Utils.LongToUInts(reg.RegionHandle, out x, out y);
|
||||||
x = x / Constants.RegionSize;
|
x = x / Constants.RegionSize;
|
||||||
y = y / Constants.RegionSize;
|
y = y / Constants.RegionSize;
|
||||||
m_log.Info("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")");
|
m_log.Debug("[ENTITY TRANSFER MODULE]: Starting to inform client about neighbour " + x + ", " + y + "(" + endPoint.ToString() + ")");
|
||||||
|
|
||||||
string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath);
|
string capsPath = reg.ServerURI + CapsUtil.GetCapsSeedPath(a.CapsPath);
|
||||||
|
|
||||||
|
@ -1197,7 +1197,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
// TODO: make Event Queue disablable!
|
// TODO: make Event Queue disablable!
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Info("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString());
|
m_log.Debug("[ENTITY TRANSFER MODULE]: Completed inform client about neighbour " + endPoint.ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,6 @@ namespace OpenSim.Services.AvatarService
|
||||||
m_log.Debug("[AVATAR SERVICE]: Starting avatar service");
|
m_log.Debug("[AVATAR SERVICE]: Starting avatar service");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get|SetAppearance should preserve existing semantics
|
|
||||||
// until AvatarData can be removed completely
|
|
||||||
public AvatarAppearance GetAppearance(UUID principalID)
|
public AvatarAppearance GetAppearance(UUID principalID)
|
||||||
{
|
{
|
||||||
AvatarData avatar = GetAvatar(principalID);
|
AvatarData avatar = GetAvatar(principalID);
|
||||||
|
@ -68,12 +66,15 @@ namespace OpenSim.Services.AvatarService
|
||||||
public AvatarData GetAvatar(UUID principalID)
|
public AvatarData GetAvatar(UUID principalID)
|
||||||
{
|
{
|
||||||
AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString());
|
AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString());
|
||||||
if (av.Length == 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
AvatarData ret = new AvatarData();
|
AvatarData ret = new AvatarData();
|
||||||
ret.Data = new Dictionary<string,string>();
|
ret.Data = new Dictionary<string,string>();
|
||||||
|
|
||||||
|
if (av.Length == 0)
|
||||||
|
{
|
||||||
|
ret.AvatarType = 1; // SL avatar
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (AvatarBaseData b in av)
|
foreach (AvatarBaseData b in av)
|
||||||
{
|
{
|
||||||
if (b.Data["Name"] == "AvatarType")
|
if (b.Data["Name"] == "AvatarType")
|
||||||
|
|
|
@ -265,32 +265,33 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
map["Height"] = OSD.FromReal(appearance.AvatarHeight);
|
map["Height"] = OSD.FromReal(appearance.AvatarHeight);
|
||||||
|
|
||||||
map["ShapeItem"] = OSD.FromUUID(appearance.BodyItem);
|
map["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString();
|
||||||
map["ShapeAsset"] = OSD.FromUUID(appearance.BodyAsset);
|
map["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString();
|
||||||
map["SkinItem"] = OSD.FromUUID(appearance.SkinItem);
|
map["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString();
|
||||||
map["SkinAsset"] = OSD.FromUUID(appearance.SkinAsset);
|
map["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString();
|
||||||
map["HairItem"] = OSD.FromUUID(appearance.HairItem);
|
map["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString();
|
||||||
map["HairAsset"] = OSD.FromUUID(appearance.HairAsset);
|
map["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString();
|
||||||
map["EyesItem"] = OSD.FromUUID(appearance.EyesItem);
|
map["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString();
|
||||||
map["EyesAsset"] = OSD.FromUUID(appearance.EyesAsset);
|
map["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString();
|
||||||
map["ShirtItem"] = OSD.FromUUID(appearance.ShirtItem);
|
map["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString();
|
||||||
map["ShirtAsset"] = OSD.FromUUID(appearance.ShirtAsset);
|
map["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString();
|
||||||
map["PantsItem"] = OSD.FromUUID(appearance.PantsItem);
|
map["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString();
|
||||||
map["PantsAsset"] = OSD.FromUUID(appearance.PantsAsset);
|
map["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString();
|
||||||
map["ShoesItem"] = OSD.FromUUID(appearance.ShoesItem);
|
map["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString();
|
||||||
map["ShoesAsset"] = OSD.FromUUID(appearance.ShoesAsset);
|
map["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString();
|
||||||
map["SocksItem"] = OSD.FromUUID(appearance.SocksItem);
|
map["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString();
|
||||||
map["SocksAsset"] = OSD.FromUUID(appearance.SocksAsset);
|
map["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString();
|
||||||
map["JacketItem"] = OSD.FromUUID(appearance.JacketItem);
|
map["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString();
|
||||||
map["JacketAsset"] = OSD.FromUUID(appearance.JacketAsset);
|
map["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString();
|
||||||
map["GlovesItem"] = OSD.FromUUID(appearance.GlovesItem);
|
map["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString();
|
||||||
map["GlovesAsset"] = OSD.FromUUID(appearance.GlovesAsset);
|
map["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString();
|
||||||
map["UndershirtItem"] = OSD.FromUUID(appearance.UnderShirtItem);
|
map["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString();
|
||||||
map["UndershirtAsset"] = OSD.FromUUID(appearance.UnderShirtAsset);
|
map["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString();
|
||||||
map["UnderpantsItem"] = OSD.FromUUID(appearance.UnderPantsItem);
|
map["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString();
|
||||||
map["UnderpantsAsset"] = OSD.FromUUID(appearance.UnderPantsAsset);
|
map["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString();
|
||||||
map["SkirtItem"] = OSD.FromUUID(appearance.SkirtItem);
|
map["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString();
|
||||||
map["SkirtAsset"] = OSD.FromUUID(appearance.SkirtAsset);
|
map["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString();
|
||||||
|
|
||||||
|
|
||||||
OSDMap items = new OSDMap();
|
OSDMap items = new OSDMap();
|
||||||
foreach (KeyValuePair<string, string> kvp in avatar.Data)
|
foreach (KeyValuePair<string, string> kvp in avatar.Data)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -139,13 +139,13 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
|
AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send
|
||||||
os = AgentCreateRequest.GetRequestStream();
|
os = AgentCreateRequest.GetRequestStream();
|
||||||
os.Write(buffer, 0, strBuffer.Length); //Send it
|
os.Write(buffer, 0, strBuffer.Length); //Send it
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
|
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}",
|
||||||
uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY);
|
uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY);
|
||||||
}
|
}
|
||||||
//catch (WebException ex)
|
//catch (WebException ex)
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
//m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message);
|
//m_log.ErrorFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message);
|
||||||
reason = "cannot contact remote region";
|
reason = "cannot contact remote region";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -172,19 +172,19 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
webResponse = AgentCreateRequest.GetResponse();
|
webResponse = AgentCreateRequest.GetResponse();
|
||||||
if (webResponse == null)
|
if (webResponse == null)
|
||||||
{
|
{
|
||||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post");
|
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
sr = new StreamReader(webResponse.GetResponseStream());
|
||||||
response = sr.ReadToEnd().Trim();
|
response = sr.ReadToEnd().Trim();
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
|
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message);
|
||||||
reason = "Destination did not reply";
|
reason = "Destination did not reply";
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
catch (NullReferenceException e)
|
catch (NullReferenceException e)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message);
|
||||||
|
|
||||||
// check for old style response
|
// check for old style response
|
||||||
if (response.ToLower().StartsWith("true"))
|
if (response.ToLower().StartsWith("true"))
|
||||||
|
@ -232,7 +232,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Add the input arguments
|
// Add the input arguments
|
||||||
|
@ -258,6 +258,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
|
private bool UpdateAgent(GridRegion destination, IAgentData cAgentData)
|
||||||
{
|
{
|
||||||
// Eventually, we want to use a caps url instead of the agentID
|
// Eventually, we want to use a caps url instead of the agentID
|
||||||
|
|
||||||
string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
|
string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";
|
||||||
|
|
||||||
HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
|
HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
|
||||||
|
@ -274,7 +275,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message);
|
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message);
|
||||||
}
|
}
|
||||||
// Add the input arguments
|
// Add the input arguments
|
||||||
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString());
|
||||||
|
@ -303,12 +304,12 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send
|
ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send
|
||||||
os = ChildUpdateRequest.GetRequestStream();
|
os = ChildUpdateRequest.GetRequestStream();
|
||||||
os.Write(buffer, 0, strBuffer.Length); //Send it
|
os.Write(buffer, 0, strBuffer.Length); //Send it
|
||||||
//m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri);
|
//m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri);
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
//catch
|
//catch
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -319,7 +320,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let's wait for the response
|
// Let's wait for the response
|
||||||
//m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate");
|
//m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate");
|
||||||
|
|
||||||
WebResponse webResponse = null;
|
WebResponse webResponse = null;
|
||||||
StreamReader sr = null;
|
StreamReader sr = null;
|
||||||
|
@ -328,19 +329,19 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
webResponse = ChildUpdateRequest.GetResponse();
|
webResponse = ChildUpdateRequest.GetResponse();
|
||||||
if (webResponse == null)
|
if (webResponse == null)
|
||||||
{
|
{
|
||||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post");
|
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post");
|
||||||
}
|
}
|
||||||
|
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
sr = new StreamReader(webResponse.GetResponseStream());
|
||||||
//reply = sr.ReadToEnd().Trim();
|
//reply = sr.ReadToEnd().Trim();
|
||||||
sr.ReadToEnd().Trim();
|
sr.ReadToEnd().Trim();
|
||||||
sr.Close();
|
sr.Close();
|
||||||
//m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
|
//m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message);
|
||||||
// ignore, really
|
// ignore, really
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -371,7 +372,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
webResponse = (HttpWebResponse)request.GetResponse();
|
webResponse = (HttpWebResponse)request.GetResponse();
|
||||||
if (webResponse == null)
|
if (webResponse == null)
|
||||||
{
|
{
|
||||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get ");
|
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
sr = new StreamReader(webResponse.GetResponseStream());
|
||||||
|
@ -381,7 +382,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message);
|
||||||
// ignore, really
|
// ignore, really
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -420,7 +421,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
WebResponse webResponse = request.GetResponse();
|
WebResponse webResponse = request.GetResponse();
|
||||||
if (webResponse == null)
|
if (webResponse == null)
|
||||||
{
|
{
|
||||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent");
|
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent");
|
||||||
}
|
}
|
||||||
|
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
sr = new StreamReader(webResponse.GetResponseStream());
|
||||||
|
@ -432,7 +433,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -448,7 +449,6 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
{
|
{
|
||||||
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/";
|
||||||
|
|
||||||
|
|
||||||
WebRequest request = WebRequest.Create(uri);
|
WebRequest request = WebRequest.Create(uri);
|
||||||
request.Method = "DELETE";
|
request.Method = "DELETE";
|
||||||
request.Timeout = 10000;
|
request.Timeout = 10000;
|
||||||
|
@ -459,7 +459,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
WebResponse webResponse = request.GetResponse();
|
WebResponse webResponse = request.GetResponse();
|
||||||
if (webResponse == null)
|
if (webResponse == null)
|
||||||
{
|
{
|
||||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete ");
|
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete ");
|
||||||
}
|
}
|
||||||
|
|
||||||
sr = new StreamReader(webResponse.GetResponseStream());
|
sr = new StreamReader(webResponse.GetResponseStream());
|
||||||
|
@ -471,7 +471,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -536,11 +536,11 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send
|
ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send
|
||||||
os = ObjectCreateRequest.GetRequestStream();
|
os = ObjectCreateRequest.GetRequestStream();
|
||||||
os.Write(buffer, 0, strBuffer.Length); //Send it
|
os.Write(buffer, 0, strBuffer.Length); //Send it
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri);
|
m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri);
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -558,7 +558,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
WebResponse webResponse = ObjectCreateRequest.GetResponse();
|
WebResponse webResponse = ObjectCreateRequest.GetResponse();
|
||||||
if (webResponse == null)
|
if (webResponse == null)
|
||||||
{
|
{
|
||||||
m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post");
|
m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -570,7 +570,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message);
|
m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
|
|
@ -149,33 +149,33 @@ namespace OpenSim.Services.Interfaces
|
||||||
Data["Serial"] = appearance.Serial.ToString();
|
Data["Serial"] = appearance.Serial.ToString();
|
||||||
// Wearables
|
// Wearables
|
||||||
Data["AvatarHeight"] = appearance.AvatarHeight.ToString();
|
Data["AvatarHeight"] = appearance.AvatarHeight.ToString();
|
||||||
Data["BodyItem"] = appearance.BodyItem.ToString();
|
Data["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString();
|
||||||
Data["EyesItem"] = appearance.EyesItem.ToString();
|
Data["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString();
|
||||||
Data["GlovesItem"] = appearance.GlovesItem.ToString();
|
Data["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString();
|
||||||
Data["HairItem"] = appearance.HairItem.ToString();
|
Data["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString();
|
||||||
Data["JacketItem"] = appearance.JacketItem.ToString();
|
Data["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString();
|
||||||
Data["PantsItem"] = appearance.PantsItem.ToString();
|
Data["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString();
|
||||||
Data["ShirtItem"] = appearance.ShirtItem.ToString();
|
Data["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString();
|
||||||
Data["ShoesItem"] = appearance.ShoesItem.ToString();
|
Data["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString();
|
||||||
Data["SkinItem"] = appearance.SkinItem.ToString();
|
Data["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString();
|
||||||
Data["SkirtItem"] = appearance.SkirtItem.ToString();
|
Data["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString();
|
||||||
Data["SocksItem"] = appearance.SocksItem.ToString();
|
Data["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString();
|
||||||
Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString();
|
Data["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString();
|
||||||
Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString();
|
Data["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString();
|
||||||
|
|
||||||
Data["BodyAsset"] = appearance.BodyAsset.ToString();
|
Data["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString();
|
||||||
Data["EyesAsset"] = appearance.EyesAsset.ToString();
|
Data["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString();
|
||||||
Data["GlovesAsset"] = appearance.GlovesAsset.ToString();
|
Data["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString();
|
||||||
Data["HairAsset"] = appearance.HairAsset.ToString();
|
Data["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString();
|
||||||
Data["JacketAsset"] = appearance.JacketAsset.ToString();
|
Data["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString();
|
||||||
Data["PantsAsset"] = appearance.PantsAsset.ToString();
|
Data["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString();
|
||||||
Data["ShirtAsset"] = appearance.ShirtAsset.ToString();
|
Data["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString();
|
||||||
Data["ShoesAsset"] = appearance.ShoesAsset.ToString();
|
Data["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString();
|
||||||
Data["SkinAsset"] = appearance.SkinAsset.ToString();
|
Data["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString();
|
||||||
Data["SkirtAsset"] = appearance.SkirtAsset.ToString();
|
Data["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString();
|
||||||
Data["SocksAsset"] = appearance.SocksAsset.ToString();
|
Data["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString();
|
||||||
Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString();
|
Data["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString();
|
||||||
Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString();
|
Data["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString();
|
||||||
|
|
||||||
// Attachments
|
// Attachments
|
||||||
List<AvatarAttachment> attachments = appearance.GetAttachments();
|
List<AvatarAttachment> attachments = appearance.GetAttachments();
|
||||||
|
@ -190,36 +190,75 @@ namespace OpenSim.Services.Interfaces
|
||||||
AvatarAppearance appearance = new AvatarAppearance(owner);
|
AvatarAppearance appearance = new AvatarAppearance(owner);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
appearance.Serial = Int32.Parse(Data["Serial"]);
|
if (Data.ContainsKey("Serial"))
|
||||||
|
appearance.Serial = Int32.Parse(Data["Serial"]);
|
||||||
|
|
||||||
// Wearables
|
// Wearables
|
||||||
appearance.BodyItem = UUID.Parse(Data["BodyItem"]);
|
if (Data.ContainsKey("BodyItem"))
|
||||||
appearance.EyesItem = UUID.Parse(Data["EyesItem"]);
|
appearance.Wearables[AvatarWearable.BODY].Wear(
|
||||||
appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]);
|
UUID.Parse(Data["BodyItem"]),
|
||||||
appearance.HairItem = UUID.Parse(Data["HairItem"]);
|
UUID.Parse(Data["BodyAsset"]));
|
||||||
appearance.JacketItem = UUID.Parse(Data["JacketItem"]);
|
|
||||||
appearance.PantsItem = UUID.Parse(Data["PantsItem"]);
|
if (Data.ContainsKey("SkinItem"))
|
||||||
appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]);
|
appearance.Wearables[AvatarWearable.SKIN].Wear(
|
||||||
appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]);
|
UUID.Parse(Data["SkinItem"]),
|
||||||
appearance.SkinItem = UUID.Parse(Data["SkinItem"]);
|
UUID.Parse(Data["SkinAsset"]));
|
||||||
appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]);
|
|
||||||
appearance.SocksItem = UUID.Parse(Data["SocksItem"]);
|
if (Data.ContainsKey("HairItem"))
|
||||||
appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]);
|
appearance.Wearables[AvatarWearable.HAIR].Wear(
|
||||||
appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]);
|
UUID.Parse(Data["HairItem"]),
|
||||||
|
UUID.Parse(Data["HairAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("EyesItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.EYES].Wear(
|
||||||
|
UUID.Parse(Data["EyesItem"]),
|
||||||
|
UUID.Parse(Data["EyesAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("ShirtItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.SHIRT].Wear(
|
||||||
|
UUID.Parse(Data["ShirtItem"]),
|
||||||
|
UUID.Parse(Data["ShirtAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("PantsItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.PANTS].Wear(
|
||||||
|
UUID.Parse(Data["PantsItem"]),
|
||||||
|
UUID.Parse(Data["PantsAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("ShoesItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.SHOES].Wear(
|
||||||
|
UUID.Parse(Data["ShoesItem"]),
|
||||||
|
UUID.Parse(Data["ShoesAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("SocksItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.SOCKS].Wear(
|
||||||
|
UUID.Parse(Data["SocksItem"]),
|
||||||
|
UUID.Parse(Data["SocksAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("JacketItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.JACKET].Wear(
|
||||||
|
UUID.Parse(Data["JacketItem"]),
|
||||||
|
UUID.Parse(Data["JacketAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("GlovesItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.GLOVES].Wear(
|
||||||
|
UUID.Parse(Data["GlovesItem"]),
|
||||||
|
UUID.Parse(Data["GlovesAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("UnderShirtItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.UNDERSHIRT].Wear(
|
||||||
|
UUID.Parse(Data["UnderShirtItem"]),
|
||||||
|
UUID.Parse(Data["UnderShirtAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("UnderPantsItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.UNDERPANTS].Wear(
|
||||||
|
UUID.Parse(Data["UnderPantsItem"]),
|
||||||
|
UUID.Parse(Data["UnderPantsAsset"]));
|
||||||
|
|
||||||
|
if (Data.ContainsKey("SkirtItem"))
|
||||||
|
appearance.Wearables[AvatarWearable.SKIRT].Wear(
|
||||||
|
UUID.Parse(Data["SkirtItem"]),
|
||||||
|
UUID.Parse(Data["SkirtAsset"]));
|
||||||
|
|
||||||
appearance.BodyAsset = UUID.Parse(Data["BodyAsset"]);
|
|
||||||
appearance.EyesAsset = UUID.Parse(Data["EyesAsset"]);
|
|
||||||
appearance.GlovesAsset = UUID.Parse(Data["GlovesAsset"]);
|
|
||||||
appearance.HairAsset = UUID.Parse(Data["HairAsset"]);
|
|
||||||
appearance.JacketAsset = UUID.Parse(Data["JacketAsset"]);
|
|
||||||
appearance.PantsAsset = UUID.Parse(Data["PantsAsset"]);
|
|
||||||
appearance.ShirtAsset = UUID.Parse(Data["ShirtAsset"]);
|
|
||||||
appearance.ShoesAsset = UUID.Parse(Data["ShoesAsset"]);
|
|
||||||
appearance.SkinAsset = UUID.Parse(Data["SkinAsset"]);
|
|
||||||
appearance.SkirtAsset = UUID.Parse(Data["SkirtAsset"]);
|
|
||||||
appearance.SocksAsset = UUID.Parse(Data["SocksAsset"]);
|
|
||||||
appearance.UnderPantsAsset = UUID.Parse(Data["UnderPantsAsset"]);
|
|
||||||
appearance.UnderShirtAsset = UUID.Parse(Data["UnderShirtAsset"]);
|
|
||||||
|
|
||||||
// Attachments
|
// Attachments
|
||||||
Dictionary<string, string> attchs = new Dictionary<string, string>();
|
Dictionary<string, string> attchs = new Dictionary<string, string>();
|
||||||
|
|
|
@ -328,8 +328,9 @@
|
||||||
; already separated from packet handling with a queue, so this will only
|
; already separated from packet handling with a queue, so this will only
|
||||||
; affect whether networking internals such as packet decoding and
|
; affect whether networking internals such as packet decoding and
|
||||||
; acknowledgement accounting are done synchronously or asynchronously
|
; acknowledgement accounting are done synchronously or asynchronously
|
||||||
|
; Default is true.
|
||||||
;
|
;
|
||||||
;async_packet_handling = false
|
;async_packet_handling = true
|
||||||
|
|
||||||
; The client socket receive buffer size determines how many
|
; The client socket receive buffer size determines how many
|
||||||
; incoming requests we can process; the default on .NET is 8192
|
; incoming requests we can process; the default on .NET is 8192
|
||||||
|
|
|
@ -64,7 +64,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
|
||||||
; Realm = "regions"
|
; Realm = "regions"
|
||||||
; AllowDuplicateNames = "True"
|
; AllowDuplicateNames = "True"
|
||||||
; Check4096 = "False"
|
|
||||||
|
;; Perform distance check for the creation of a linked region
|
||||||
|
; Check4096 = "True"
|
||||||
|
|
||||||
;; Next, we can specify properties of regions, including default and fallback regions
|
;; Next, we can specify properties of regions, including default and fallback regions
|
||||||
;; The syntax is: Region_<RegionName> = "<flags>"
|
;; The syntax is: Region_<RegionName> = "<flags>"
|
||||||
|
|
|
@ -53,8 +53,8 @@
|
||||||
;;--- For MySql region storage (alternative)
|
;;--- For MySql region storage (alternative)
|
||||||
;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
|
;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
|
||||||
|
|
||||||
; If HG, do you want this check on the distance to be performed?
|
;; With hypergrid, perform distance check for the creation of a linked region
|
||||||
; Check4096 = "False"
|
; Check4096 = true
|
||||||
|
|
||||||
;; Next, we can specify properties of regions, including default and fallback regions
|
;; Next, we can specify properties of regions, including default and fallback regions
|
||||||
;; The syntax is: Region_<RegioName> = "<flags>"
|
;; The syntax is: Region_<RegioName> = "<flags>"
|
||||||
|
|
Loading…
Reference in New Issue