Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-11-02 22:58:33 +00:00
commit 26f12f479f
44 changed files with 19371 additions and 19377 deletions

View File

@ -1628,11 +1628,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);
} }
} }
@ -1686,10 +1686,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)
@ -1720,13 +1720,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);
} }
} }
} }
@ -2175,8 +2174,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)

View File

@ -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");

View File

@ -10,3 +10,11 @@ CREATE TABLE Avatars (
KEY(PrincipalID)); KEY(PrincipalID));
COMMIT; COMMIT;
:VERSION 2
BEGIN;
alter table Avatars change column Value Value text;
COMMIT;

View File

@ -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"]);

View File

@ -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; }
@ -329,9 +101,8 @@ namespace OpenSim.Framework
public AvatarAppearance(UUID owner) public AvatarAppearance(UUID owner)
{ {
// DEBUG ON // m_log.WarnFormat("[AVATAR APPEARANCE]: create empty appearance for {0}",owner);
m_log.WarnFormat("[AVATAR APPEARANCE] create empty appearance for {0}",owner);
// DEBUG OFF
m_serial = 1; m_serial = 1;
m_owner = owner; m_owner = owner;
@ -345,9 +116,8 @@ namespace OpenSim.Framework
public AvatarAppearance(UUID avatarID, OSDMap map) public AvatarAppearance(UUID avatarID, OSDMap map)
{ {
// DEBUG ON // m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID);
m_log.WarnFormat("[AVATAR APPEARANCE] create appearance for {0} from OSDMap",avatarID);
// DEBUG OFF
m_owner = avatarID; m_owner = avatarID;
Unpack(map); Unpack(map);
SetHeight(); SetHeight();
@ -355,9 +125,8 @@ namespace OpenSim.Framework
public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams) public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams)
{ {
// DEBUG ON // m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);
m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);
// DEBUG OFF
m_serial = 1; m_serial = 1;
m_owner = avatarID; m_owner = avatarID;
@ -381,11 +150,14 @@ namespace OpenSim.Framework
m_attachments = new Dictionary<int, List<AvatarAttachment>>(); m_attachments = new Dictionary<int, List<AvatarAttachment>>();
} }
public AvatarAppearance(AvatarAppearance appearance) public AvatarAppearance(AvatarAppearance appearance) : this(appearance, true)
{ {
// DEBUG ON }
m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance");
// DEBUG OFF public AvatarAppearance(AvatarAppearance appearance, bool copyWearables)
{
// m_log.WarnFormat("[AVATAR APPEARANCE] create from an existing appearance");
if (appearance == null) if (appearance == null)
{ {
m_serial = 1; m_serial = 1;
@ -404,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];
if (appearance.Wearables != null) for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
m_wearables[i] = new AvatarWearable();
if (copyWearables && (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]);
} }
@ -429,6 +202,28 @@ namespace OpenSim.Framework
AppendAttachment(new AvatarAttachment(attachment)); AppendAttachment(new AvatarAttachment(attachment));
} }
public void GetAssetsFrom(AvatarAppearance app)
{
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
{
for (int j = 0 ; j < m_wearables[i].Count ; j++)
{
UUID itemID = m_wearables[i][j].ItemID;
UUID assetID = app.Wearables[i].GetAsset(itemID);
if (assetID != UUID.Zero)
m_wearables[i].Add(itemID, assetID);
}
}
}
public void ClearWearables()
{
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
m_wearables[i] = new AvatarWearable();
}
protected virtual void SetDefaultWearables() protected virtual void SetDefaultWearables()
{ {
m_wearables = AvatarWearable.DefaultWearables; m_wearables = AvatarWearable.DefaultWearables;
@ -436,11 +231,11 @@ namespace OpenSim.Framework
protected virtual void SetDefaultParams() protected virtual void SetDefaultParams()
{ {
m_visualparams = new byte[VISUALPARAM_COUNT]; m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 };
for (int i = 0; i < VISUALPARAM_COUNT; i++) // for (int i = 0; i < VISUALPARAM_COUNT; i++)
{ // {
m_visualparams[i] = 150; // m_visualparams[i] = 150;
} // }
} }
protected virtual void SetDefaultTexture() protected virtual void SetDefaultTexture()
@ -479,10 +274,9 @@ namespace OpenSim.Framework
} }
changed = true; changed = true;
// DEBUG ON
if (newface != null) // if (newface != null)
m_log.WarnFormat("[AVATAR APPEARANCE] index {0}, new texture id {1}",i,newface.TextureID); // m_log.WarnFormat("[AVATAR APPEARANCE]: index {0}, new texture id {1}",i,newface.TextureID);
// DEBUG OFF
} }
m_texture = textureEntry; m_texture = textureEntry;
@ -552,7 +346,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);
} }
@ -568,7 +364,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++)
@ -738,11 +537,11 @@ 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
{ {
m_log.Warn("[AVATARAPPEARANCE] failed to unpack wearables"); m_log.Warn("[AVATAR APPEARANCE]: failed to unpack wearables");
} }
// Avatar Textures // Avatar Textures
@ -760,7 +559,7 @@ namespace OpenSim.Framework
} }
else else
{ {
m_log.Warn("[AVATARAPPEARANCE] failed to unpack textures"); m_log.Warn("[AVATAR APPEARANCE]: failed to unpack textures");
} }
// Visual Parameters // Visual Parameters
@ -772,7 +571,7 @@ namespace OpenSim.Framework
} }
else else
{ {
m_log.Warn("[AVATARAPPEARANCE] failed to unpack visual parameters"); m_log.Warn("[AVATAR APPEARANCE]: failed to unpack visual parameters");
} }
// Attachments // Attachments
@ -786,7 +585,7 @@ namespace OpenSim.Framework
} }
catch (Exception e) catch (Exception e)
{ {
m_log.ErrorFormat("[AVATARAPPEARANCE] unpack failed badly: {0}",e.Message); m_log.ErrorFormat("[AVATAR APPEARANCE]: unpack failed badly: {0}{1}", e.Message, e.StackTrace);
} }
} }

View File

@ -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,171 @@ 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");
private static AvatarWearable[] defaultWearables = null;
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(WearableItem item)
{
Wear(item.ItemID, item.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 UUID GetAsset(UUID itemID)
{
if (!m_items.ContainsKey(itemID))
return UUID.Zero;
return m_items[itemID];
} }
public static AvatarWearable[] DefaultWearables public static AvatarWearable[] DefaultWearables
{ {
get get
{ {
AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 13 of these 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;
} }

View File

@ -988,9 +988,7 @@ namespace OpenSim.Framework.Capabilities
public void BakedTextureUploaded(UUID assetID, byte[] data) public void BakedTextureUploaded(UUID assetID, byte[] data)
{ {
// DEBUG ON // m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
m_log.WarnFormat("[CAPS]: Received baked texture {0}", assetID.ToString());
// DEBUG OFF
AssetBase asset; AssetBase asset;
asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString()); asset = new AssetBase(assetID, "Baked Texture", (sbyte)AssetType.Texture, m_agentID.ToString());
asset.Data = data; asset.Data = data;

View File

@ -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);
} }
} }

View File

@ -32,6 +32,7 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using OpenMetaverse; using OpenMetaverse;
using Nini.Config; using Nini.Config;
@ -62,6 +63,7 @@ namespace OpenSim.Framework.Console
new Dictionary<UUID, ConsoleConnection>(); new Dictionary<UUID, ConsoleConnection>();
private string m_UserName = String.Empty; private string m_UserName = String.Empty;
private string m_Password = String.Empty; private string m_Password = String.Empty;
private string m_AllowedOrigin = String.Empty;
public RemoteConsole(string defaultPrompt) : base(defaultPrompt) public RemoteConsole(string defaultPrompt) : base(defaultPrompt)
{ {
@ -77,6 +79,7 @@ namespace OpenSim.Framework.Console
m_UserName = netConfig.GetString("ConsoleUser", String.Empty); m_UserName = netConfig.GetString("ConsoleUser", String.Empty);
m_Password = netConfig.GetString("ConsolePass", String.Empty); m_Password = netConfig.GetString("ConsolePass", String.Empty);
m_AllowedOrigin = netConfig.GetString("ConsoleAllowedOrigin", String.Empty);
} }
public void SetServer(IHttpServer server) public void SetServer(IHttpServer server)
@ -150,6 +153,29 @@ namespace OpenSim.Framework.Console
return cmdinput; return cmdinput;
} }
private Hashtable CheckOrigin(Hashtable result)
{
if (!string.IsNullOrEmpty(m_AllowedOrigin))
result["access_control_allow_origin"] = m_AllowedOrigin;
return result;
}
/* TODO: Figure out how PollServiceHTTPHandler can access the request headers
* in order to use m_AllowedOrigin as a regular expression
private Hashtable CheckOrigin(Hashtable headers, Hashtable result)
{
if (!string.IsNullOrEmpty(m_AllowedOrigin))
{
if (headers.ContainsKey("origin"))
{
string origin = headers["origin"].ToString();
if (Regex.IsMatch(origin, m_AllowedOrigin))
result["access_control_allow_origin"] = origin;
}
}
return result;
}
*/
private void DoExpire() private void DoExpire()
{ {
List<UUID> expired = new List<UUID>(); List<UUID> expired = new List<UUID>();
@ -235,6 +261,7 @@ namespace OpenSim.Framework.Console
reply["str_response_string"] = xmldoc.InnerXml; reply["str_response_string"] = xmldoc.InnerXml;
reply["int_response_code"] = 200; reply["int_response_code"] = 200;
reply["content_type"] = "text/xml"; reply["content_type"] = "text/xml";
reply = CheckOrigin(reply);
return reply; return reply;
} }
@ -289,6 +316,7 @@ namespace OpenSim.Framework.Console
reply["str_response_string"] = xmldoc.InnerXml; reply["str_response_string"] = xmldoc.InnerXml;
reply["int_response_code"] = 200; reply["int_response_code"] = 200;
reply["content_type"] = "text/xml"; reply["content_type"] = "text/xml";
reply = CheckOrigin(reply);
return reply; return reply;
} }
@ -344,6 +372,7 @@ namespace OpenSim.Framework.Console
reply["str_response_string"] = xmldoc.InnerXml; reply["str_response_string"] = xmldoc.InnerXml;
reply["int_response_code"] = 200; reply["int_response_code"] = 200;
reply["content_type"] = "text/xml"; reply["content_type"] = "text/xml";
reply = CheckOrigin(reply);
return reply; return reply;
} }
@ -457,6 +486,7 @@ namespace OpenSim.Framework.Console
result["content_type"] = "application/xml"; result["content_type"] = "application/xml";
result["keepalive"] = false; result["keepalive"] = false;
result["reusecontext"] = false; result["reusecontext"] = false;
result = CheckOrigin(result);
return result; return result;
} }
@ -480,6 +510,7 @@ namespace OpenSim.Framework.Console
result["content_type"] = "text/xml"; result["content_type"] = "text/xml";
result["keepalive"] = false; result["keepalive"] = false;
result["reusecontext"] = false; result["reusecontext"] = false;
result = CheckOrigin(result);
return result; return result;
} }

View File

@ -1450,6 +1450,10 @@ namespace OpenSim.Framework.Servers.HttpServer
if (responsedata.ContainsKey("reusecontext")) if (responsedata.ContainsKey("reusecontext"))
response.ReuseContext = (bool) responsedata["reusecontext"]; response.ReuseContext = (bool) responsedata["reusecontext"];
// Cross-Origin Resource Sharing with simple requests
if (responsedata.ContainsKey("access_control_allow_origin"))
response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]);
//Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
//and should check for NullReferenceExceptions //and should check for NullReferenceExceptions

View File

@ -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;
} }
} }

View File

@ -264,9 +264,10 @@ namespace OpenSim
LoadOar); LoadOar);
m_console.Commands.AddCommand("region", false, "save oar", m_console.Commands.AddCommand("region", false, "save oar",
"save oar [<OAR path>]", "save oar [-v|version=N] [<OAR path>]",
"Save a region's data to an OAR archive.", "Save a region's data to an OAR archive.",
"The OAR path must be a filesystem path." "-v|version=N generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
+ "The OAR path must be a filesystem path."
+ " If this is not given then the oar is saved to region.oar in the current directory.", + " If this is not given then the oar is saved to region.oar in the current directory.",
SaveOar); SaveOar);

View File

@ -3417,20 +3417,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);
@ -5759,6 +5768,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
AvatarWearingArgs wearingArgs = new AvatarWearingArgs(); AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
for (int i = 0; i < nowWearing.WearableData.Length; i++) for (int i = 0; i < nowWearing.WearableData.Length; i++)
{ {
m_log.DebugFormat("[XXX]: Wearable type {0} item {1}", nowWearing.WearableData[i].WearableType, nowWearing.WearableData[i].ItemID);
AvatarWearingArgs.Wearable wearable = AvatarWearingArgs.Wearable wearable =
new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID, new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID,
nowWearing.WearableData[i].WearableType); nowWearing.WearableData[i].WearableType);

View File

@ -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);
@ -615,8 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// UseCircuitCode handling // UseCircuitCode handling
if (packet.Type == PacketType.UseCircuitCode) if (packet.Type == PacketType.UseCircuitCode)
{ {
m_log.Debug("[LLUDPSERVER]: Handling UseCircuitCode packet from " + buffer.RemoteEndPoint);
object[] array = new object[] { buffer, packet }; object[] array = new object[] { buffer, packet };
if (m_asyncPacketHandling) if (m_asyncPacketHandling)
@ -827,9 +826,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private void HandleUseCircuitCode(object o) private void HandleUseCircuitCode(object o)
{ {
DateTime startTime = DateTime.Now;
object[] array = (object[])o; object[] array = (object[])o;
UDPPacketBuffer buffer = (UDPPacketBuffer)array[0]; UDPPacketBuffer buffer = (UDPPacketBuffer)array[0];
UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1]; UseCircuitCodePacket packet = (UseCircuitCodePacket)array[1];
m_log.DebugFormat("[LLUDPSERVER]: Handling UseCircuitCode request from {0}", buffer.RemoteEndPoint);
IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint; IPEndPoint remoteEndPoint = (IPEndPoint)buffer.RemoteEndPoint;
@ -838,6 +840,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Acknowledge the UseCircuitCode packet // Acknowledge the UseCircuitCode packet
SendAckImmediate(remoteEndPoint, packet.Header.Sequence); SendAckImmediate(remoteEndPoint, packet.Header.Sequence);
m_log.DebugFormat(
"[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
} }
private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber) private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber)

View File

@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
ScenePresence sp = m_scene.GetScenePresence(client.AgentId); ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
if (sp == null) if (sp == null)
{ {
m_log.WarnFormat("[AVFACTORY] SetAppearance unable to find presence for {0}",client.AgentId); m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}", client.AgentId);
return false; return false;
} }
@ -147,14 +147,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
/// <param name="visualParam"></param> /// <param name="visualParam"></param>
public void SetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams) public void SetAppearance(IClientAPI client, Primitive.TextureEntry textureEntry, byte[] visualParams)
{ {
// DEBUG ON // m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance for {0}",client.AgentId);
m_log.WarnFormat("[AVFACTORY] SetAppearance for {0}",client.AgentId);
// DEBUG OFF
ScenePresence sp = m_scene.GetScenePresence(client.AgentId); ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
if (sp == null) if (sp == null)
{ {
m_log.WarnFormat("[AVFACTORY] SetAppearance unable to find presence for {0}",client.AgentId); m_log.WarnFormat("[AVATAR FACTORY MODULE]: SetAppearance unable to find presence for {0}",client.AgentId);
return; return;
} }
@ -212,8 +210,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{ {
if (m_scene.AssetService.Get(textureID.ToString()) == null) if (m_scene.AssetService.Get(textureID.ToString()) == null)
{ {
m_log.WarnFormat("[AVFACTORY]: Missing baked texture {0} ({1}) for avatar {2}", m_log.WarnFormat("[AVATAR FACTORY MODULE]: Missing baked texture {0} ({1}) for avatar {2}",
textureID,idx,client.Name); textureID, idx, client.Name);
return false; return false;
} }
return true; return true;
@ -223,9 +221,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
public void QueueAppearanceSend(UUID agentid) public void QueueAppearanceSend(UUID agentid)
{ {
// DEBUG ON // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}",agentid);
m_log.WarnFormat("[AVFACTORY] Queue appearance send for {0}",agentid);
// DEBUG OFF
// 100 nanoseconds (ticks) we should wait // 100 nanoseconds (ticks) we should wait
long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000); long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_sendtime * 10000000);
@ -238,9 +234,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
public void QueueAppearanceSave(UUID agentid) public void QueueAppearanceSave(UUID agentid)
{ {
// DEBUG ON // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}",agentid);
m_log.WarnFormat("[AVFACTORY] Queue appearance save for {0}",agentid);
// DEBUG OFF
// 100 nanoseconds (ticks) we should wait // 100 nanoseconds (ticks) we should wait
long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000); long timestamp = DateTime.Now.Ticks + Convert.ToInt64(m_savetime * 10000000);
@ -256,13 +250,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
ScenePresence sp = m_scene.GetScenePresence(agentid); ScenePresence sp = m_scene.GetScenePresence(agentid);
if (sp == null) if (sp == null)
{ {
m_log.WarnFormat("[AVFACTORY] Agent {0} no longer in the scene",agentid); m_log.WarnFormat("[AVATAR FACTORY MODULE]: Agent {0} no longer in the scene", agentid);
return; return;
} }
// DEBUG ON // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid);
m_log.WarnFormat("[AVFACTORY] Handle appearance send for {0}",agentid);
// DEBUG OFF
// Send the appearance to everyone in the scene // Send the appearance to everyone in the scene
sp.SendAppearanceToAllOtherAgents(); sp.SendAppearanceToAllOtherAgents();
@ -288,7 +280,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
ScenePresence sp = m_scene.GetScenePresence(agentid); ScenePresence sp = m_scene.GetScenePresence(agentid);
if (sp == null) if (sp == null)
{ {
m_log.WarnFormat("[AVFACTORY] Agent {0} no longer in the scene",agentid); m_log.WarnFormat("[AVATAR FACTORY MODULE]: Agent {0} no longer in the scene", agentid);
return; return;
} }
@ -339,13 +331,12 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
ScenePresence sp = m_scene.GetScenePresence(client.AgentId); ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
if (sp == null) if (sp == null)
{ {
m_log.WarnFormat("[AVFACTORY] SendWearables unable to find presence for {0}",client.AgentId); m_log.WarnFormat("[AVATAR FACTORY MODULE]: SendWearables unable to find presence for {0}", client.AgentId);
return; return;
} }
// DEBUG ON // m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId);
m_log.WarnFormat("[AVFACTORY]: Received request for wearables of {0}", client.AgentId);
// DEBUG OFF
client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++); client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++);
} }
@ -359,25 +350,22 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
ScenePresence sp = m_scene.GetScenePresence(client.AgentId); ScenePresence sp = m_scene.GetScenePresence(client.AgentId);
if (sp == null) if (sp == null)
{ {
m_log.WarnFormat("[AVFACTORY] AvatarIsWearing unable to find presence for {0}",client.AgentId); m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing unable to find presence for {0}", client.AgentId);
return; return;
} }
// DEBUG ON // m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId);
m_log.WarnFormat("[AVFACTORY]: AvatarIsWearing called for {0}",client.AgentId);
// DEBUG OFF
AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance); AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
{ {
if (wear.Type < AvatarWearable.MAX_WEARABLES) if (wear.Type < AvatarWearable.MAX_WEARABLES)
{ avatAppearance.Wearables[wear.Type].Add(wear.ItemID,UUID.Zero);
AvatarWearable newWearable = new AvatarWearable(wear.ItemID,UUID.Zero);
avatAppearance.SetWearable(wear.Type, newWearable);
}
} }
avatAppearance.GetAssetsFrom(sp.Appearance);
// This could take awhile since it needs to pull inventory // This could take awhile since it needs to pull inventory
SetAppearanceAssets(sp.UUID, ref avatAppearance); SetAppearanceAssets(sp.UUID, ref avatAppearance);
@ -393,34 +381,35 @@ 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; if (appearance.Wearables[i][j].ItemID == UUID.Zero)
} continue;
else
{ // Ignore ruth's assets
InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID)
continue;
InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].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(
"[AVFACTORY]: 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;
} }
} }
} }
} }
else else
{ {
m_log.WarnFormat("[AVFACTORY]: user {0} has no inventory, appearance isn't going to work", userID); m_log.WarnFormat("[AVATAR FACTORY MODULE]: user {0} has no inventory, appearance isn't going to work", userID);
} }
} }
} }

View File

@ -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)
{ {

View File

@ -193,10 +193,11 @@ 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;
} }
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} uuid={2}", m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} uuid={2}",
finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID); finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID);
@ -240,7 +241,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");
} }
} }
@ -421,7 +422,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,
@ -594,7 +594,8 @@ 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 false; return false;
} }
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);
// a little eekie that this goes back to Scene and with a forced cast, will fix that at some point... // a little eekie that this goes back to Scene and with a forced cast, will fix that at some point...
@ -1217,7 +1218,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 = "http://" + reg.ExternalHostName + ":" + reg.HttpPort string capsPath = "http://" + reg.ExternalHostName + ":" + reg.HttpPort
+ "/CAPS/" + a.CapsPath + "0000/"; + "/CAPS/" + a.CapsPath + "0000/";
@ -1253,7 +1254,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());
} }

View File

@ -176,44 +176,44 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
stream = response.GetResponseStream(); stream = response.GetResponseStream();
if (stream != null) if (stream != null)
{ {
Bitmap image = new Bitmap(stream);
Size newsize;
// TODO: make this a bit less hard coded
if ((image.Height < 64) && (image.Width < 64))
{
newsize = new Size(32, 32);
}
else if ((image.Height < 128) && (image.Width < 128))
{
newsize = new Size(64, 64);
}
else if ((image.Height < 256) && (image.Width < 256))
{
newsize = new Size(128, 128);
}
else if ((image.Height < 512 && image.Width < 512))
{
newsize = new Size(256, 256);
}
else if ((image.Height < 1024 && image.Width < 1024))
{
newsize = new Size(512, 512);
}
else
{
newsize = new Size(1024, 1024);
}
Bitmap resize = new Bitmap(image, newsize);
try try
{ {
Bitmap image = new Bitmap(stream);
Size newsize;
// TODO: make this a bit less hard coded
if ((image.Height < 64) && (image.Width < 64))
{
newsize = new Size(32, 32);
}
else if ((image.Height < 128) && (image.Width < 128))
{
newsize = new Size(64, 64);
}
else if ((image.Height < 256) && (image.Width < 256))
{
newsize = new Size(128, 128);
}
else if ((image.Height < 512 && image.Width < 512))
{
newsize = new Size(256, 256);
}
else if ((image.Height < 1024 && image.Width < 1024))
{
newsize = new Size(512, 512);
}
else
{
newsize = new Size(1024, 1024);
}
Bitmap resize = new Bitmap(image, newsize);
imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
} }
catch (Exception) catch (Exception)
{ {
m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!");
} }
} }
else else

View File

@ -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.
* *
@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
public void OnMakeRootAgent(ScenePresence sp) public void OnMakeRootAgent(ScenePresence sp)
{ {
m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); // m_log.DebugFormat("[ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName);
m_GridUserService.SetLastPosition(sp.UUID.ToString(), UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); m_GridUserService.SetLastPosition(sp.UUID.ToString(), UUID.Zero, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat);
} }

View File

@ -261,7 +261,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public InventoryItemBase GetItem(InventoryItemBase item) public InventoryItemBase GetItem(InventoryItemBase item)
{ {
m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetItem {0}", item.ID); //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetItem {0}", item.ID);
if (item == null) if (item == null)
return null; return null;
@ -272,7 +272,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
public InventoryFolderBase GetFolder(InventoryFolderBase folder) public InventoryFolderBase GetFolder(InventoryFolderBase folder)
{ {
m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID); //m_log.DebugFormat("[XINVENTORY CONNECTOR]: GetFolder {0}", folder.ID);
if (folder == null) if (folder == null)
return null; return null;

View File

@ -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.
* *
@ -71,7 +71,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
public void OnMakeRootAgent(ScenePresence sp) public void OnMakeRootAgent(ScenePresence sp)
{ {
m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); // m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName);
m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID); m_PresenceService.ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID);
} }

View File

@ -137,16 +137,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive.");
Dictionary<string, object> serializationOptions = new Dictionary<string, object>();
// if (m_options.ContainsKey("version") && (string)m_options["version"] == "0")
// serializationOptions["old-guids"] = true;
// Write out scene object metadata // Write out scene object metadata
foreach (SceneObjectGroup sceneObject in m_sceneObjects) foreach (SceneObjectGroup sceneObject in m_sceneObjects)
{ {
//m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType());
string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, serializationOptions); string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, m_options);
m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject); m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject);
} }

View File

@ -187,20 +187,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver
/// <returns></returns> /// <returns></returns>
public static string Create0p2ControlFile(Dictionary<string, object> options) public static string Create0p2ControlFile(Dictionary<string, object> options)
{ {
int majorVersion = 0, minorVersion = 4; int majorVersion = 0, minorVersion = 5;
/* if (options.ContainsKey("version"))
if (options.ContainsKey("version") && (string)options["version"] == "0")
{ {
majorVersion = 0;
minorVersion = 3;
}
else
{
majorVersion = 1;
minorVersion = 0; minorVersion = 0;
string[] parts = options["version"].ToString().Split('.');
if (parts.Length >= 1)
majorVersion = Int32.Parse(parts[0]);
if (parts.Length >= 2)
minorVersion = Int32.Parse(parts[1]);
} }
*/
m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion);
// if (majorVersion == 1) // if (majorVersion == 1)

View File

@ -355,7 +355,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
if (renderMesh == null) if (renderMesh == null)
return; return;
warp_Vector primPos = ConvertVector(prim.AbsolutePosition); warp_Vector primPos = ConvertVector(prim.GetWorldPosition());
warp_Quaternion primRot = ConvertQuaternion(prim.RotationOffset); warp_Quaternion primRot = ConvertQuaternion(prim.RotationOffset);
warp_Matrix m = warp_Matrix.quaternionMatrix(primRot); warp_Matrix m = warp_Matrix.quaternionMatrix(primRot);

View File

@ -324,7 +324,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
if (threadrunning) return; if (threadrunning) return;
threadrunning = true; threadrunning = true;
m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread"); // m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread");
Watchdog.StartThread(process, "MapItemRequestThread", ThreadPriority.BelowNormal, true); Watchdog.StartThread(process, "MapItemRequestThread", ThreadPriority.BelowNormal, true);
} }

View File

@ -177,7 +177,6 @@ namespace OpenSim.Region.Framework.Scenes
private float m_health = 100f; private float m_health = 100f;
// Default AV Height // Default AV Height
private float m_avHeight = 127.0f;
protected RegionInfo m_regionInfo; protected RegionInfo m_regionInfo;
protected ulong crossingFromRegion; protected ulong crossingFromRegion;
@ -974,9 +973,10 @@ namespace OpenSim.Region.Framework.Scenes
} }
float localAVHeight = 1.56f; float localAVHeight = 1.56f;
if (m_avHeight != 127.0f) if (m_appearance != null)
{ {
localAVHeight = m_avHeight; if (m_appearance.AvatarHeight > 0)
localAVHeight = m_appearance.AvatarHeight;
} }
float posZLimit = 0; float posZLimit = 0;
@ -991,17 +991,6 @@ namespace OpenSim.Region.Framework.Scenes
} }
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene(isFlying);
if (m_forceFly)
{
m_physicsActor.Flying = true;
}
else if (m_flyDisabled)
{
m_physicsActor.Flying = false;
}
if (m_appearance != null) if (m_appearance != null)
{ {
if (m_appearance.AvatarHeight > 0) if (m_appearance.AvatarHeight > 0)
@ -1014,6 +1003,23 @@ namespace OpenSim.Region.Framework.Scenes
m_appearance = new AvatarAppearance(UUID); m_appearance = new AvatarAppearance(UUID);
} }
AddToPhysicalScene(isFlying);
if (m_appearance != null)
{
if (m_appearance.AvatarHeight > 0)
SetHeight(m_appearance.AvatarHeight);
}
if (m_forceFly)
{
m_physicsActor.Flying = true;
}
else if (m_flyDisabled)
{
m_physicsActor.Flying = false;
}
// Don't send an animation pack here, since on a region crossing this will sometimes cause a flying // Don't send an animation pack here, since on a region crossing this will sometimes cause a flying
// avatar to return to the standing position in mid-air. On login it looks like this is being sent // avatar to return to the standing position in mid-air. On login it looks like this is being sent
// elsewhere anyway // elsewhere anyway
@ -1200,10 +1206,9 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
public void SetHeight(float height) public void SetHeight(float height)
{ {
m_avHeight = height;
if (PhysicsActor != null && !IsChildAgent) if (PhysicsActor != null && !IsChildAgent)
{ {
Vector3 SetSize = new Vector3(0.45f, 0.6f, m_avHeight); Vector3 SetSize = new Vector3(0.45f, 0.6f, height);
PhysicsActor.Size = SetSize; PhysicsActor.Size = SetSize;
} }
} }
@ -1215,9 +1220,11 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
public void CompleteMovement(IClientAPI client) public void CompleteMovement(IClientAPI client)
{ {
// DEBUG ON DateTime startTime = DateTime.Now;
m_log.WarnFormat("[SCENE PRESENCE]: CompleteMovement for {0}",UUID);
// DEBUG OFF m_log.DebugFormat(
"[SCENE PRESENCE]: Completing movement of {0} into region {1}",
client.Name, Scene.RegionInfo.RegionName);
Vector3 look = Velocity; Vector3 look = Velocity;
if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) if ((look.X == 0) && (look.Y == 0) && (look.Z == 0))
@ -1264,6 +1271,10 @@ namespace OpenSim.Region.Framework.Scenes
if (friendsModule != null) if (friendsModule != null)
friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); friendsModule.SendFriendsOnlineIfNeeded(ControllingClient);
} }
m_log.DebugFormat(
"[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
} }
/// <summary> /// <summary>
@ -1859,9 +1870,10 @@ namespace OpenSim.Region.Framework.Scenes
SendFullUpdateToAllClients(); SendFullUpdateToAllClients();
m_requestedSitTargetID = 0; m_requestedSitTargetID = 0;
if ((m_physicsActor != null) && (m_avHeight > 0)) if (m_physicsActor != null && m_appearance != null)
{ {
SetHeight(m_avHeight); if (m_appearance.AvatarHeight > 0)
SetHeight(m_appearance.AvatarHeight);
} }
} }
Animator.TrySetMovementAnimation("STAND"); Animator.TrySetMovementAnimation("STAND");
@ -2728,22 +2740,25 @@ namespace OpenSim.Region.Framework.Scenes
if (remoteAvatar == null) if (remoteAvatar == null)
return; return;
IClientAPI cl=remoteAvatar.ControllingClient; IClientAPI cl = remoteAvatar.ControllingClient;
if (cl == null) if (cl == null)
return; return;
if (m_appearance.Texture == null) if (m_appearance.Texture == null)
return; return;
if (LocalId == remoteAvatar.LocalId) // MT: This is needed for sit. It's legal to send it to oneself, and the name
{ // of the method is a misnomer
m_log.WarnFormat("[SP] An agent is attempting to send data to itself; {0}",UUID); //
return; // if (LocalId == remoteAvatar.LocalId)
} // {
// m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send avatar data to itself; {0}", UUID);
// return;
// }
if (IsChildAgent) if (IsChildAgent)
{ {
m_log.WarnFormat("[SCENEPRESENCE] A child agent is attempting to send out avatar data"); m_log.WarnFormat("[SCENEPRESENCE]: A child agent is attempting to send out avatar data; {0}", UUID);
return; return;
} }
@ -2826,14 +2841,14 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (m_scene.AvatarFactory.ValidateBakedTextureCache(m_controllingClient)) if (m_scene.AvatarFactory.ValidateBakedTextureCache(m_controllingClient))
{ {
m_log.WarnFormat("[SP] baked textures are in the ache for {0}",Name); // m_log.WarnFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name);
m_controllingClient.SendAppearance( m_controllingClient.SendAppearance(
m_appearance.Owner,m_appearance.VisualParams,m_appearance.Texture.GetBytes()); m_appearance.Owner,m_appearance.VisualParams,m_appearance.Texture.GetBytes());
} }
} }
else else
{ {
m_log.WarnFormat("[SP] AvatarFactory not set"); m_log.WarnFormat("[SCENEPRESENCE]: AvatarFactory not set for {0}", Name);
} }
SendInitialFullUpdateToAllClients(); SendInitialFullUpdateToAllClients();
@ -2845,7 +2860,7 @@ namespace OpenSim.Region.Framework.Scenes
public void SendAppearanceToAllOtherAgents() public void SendAppearanceToAllOtherAgents()
{ {
// DEBUG ON // DEBUG ON
m_log.WarnFormat("[SP] Send appearance from {0} to all other agents",m_uuid); // m_log.WarnFormat("[SCENEPRESENCE]: Send appearance from {0} to all other agents", m_uuid);
// DEBUG OFF // DEBUG OFF
m_perfMonMS = Util.EnvironmentTickCount(); m_perfMonMS = Util.EnvironmentTickCount();
@ -2868,7 +2883,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (LocalId == avatar.LocalId) if (LocalId == avatar.LocalId)
{ {
m_log.WarnFormat("[SP] An agent is attempting to send data to itself; {0}",UUID); m_log.WarnFormat("[SCENE PRESENCE]: An agent is attempting to send appearance data to itself; {0}", UUID);
return; return;
} }
@ -2920,7 +2935,7 @@ namespace OpenSim.Region.Framework.Scenes
cadu.ActiveGroupID = UUID.Zero.Guid; cadu.ActiveGroupID = UUID.Zero.Guid;
cadu.AgentID = UUID.Guid; cadu.AgentID = UUID.Guid;
cadu.alwaysrun = m_setAlwaysRun; cadu.alwaysrun = m_setAlwaysRun;
cadu.AVHeight = m_avHeight; cadu.AVHeight = m_appearance.AvatarHeight;;
Vector3 tempCameraCenter = m_CameraCenter; Vector3 tempCameraCenter = m_CameraCenter;
cadu.cameraPosition = tempCameraCenter; cadu.cameraPosition = tempCameraCenter;
cadu.drawdistance = m_DrawDistance; cadu.drawdistance = m_DrawDistance;
@ -3256,7 +3271,6 @@ namespace OpenSim.Region.Framework.Scenes
m_CameraCenter = cAgentData.Center + offset; m_CameraCenter = cAgentData.Center + offset;
m_avHeight = cAgentData.Size.Z;
//SetHeight(cAgentData.AVHeight); //SetHeight(cAgentData.AVHeight);
if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
@ -3281,8 +3295,6 @@ namespace OpenSim.Region.Framework.Scenes
cAgent.Position = AbsolutePosition; cAgent.Position = AbsolutePosition;
cAgent.Velocity = m_velocity; cAgent.Velocity = m_velocity;
cAgent.Center = m_CameraCenter; cAgent.Center = m_CameraCenter;
// Don't copy the size; it is inferred from apearance parameters
//cAgent.Size = new Vector3(0, 0, m_avHeight);
cAgent.AtAxis = m_CameraAtAxis; cAgent.AtAxis = m_CameraAtAxis;
cAgent.LeftAxis = m_CameraLeftAxis; cAgent.LeftAxis = m_CameraLeftAxis;
cAgent.UpAxis = m_CameraUpAxis; cAgent.UpAxis = m_CameraUpAxis;
@ -3401,7 +3413,6 @@ namespace OpenSim.Region.Framework.Scenes
m_velocity = cAgent.Velocity; m_velocity = cAgent.Velocity;
m_CameraCenter = cAgent.Center; m_CameraCenter = cAgent.Center;
//m_avHeight = cAgent.Size.Z;
m_CameraAtAxis = cAgent.AtAxis; m_CameraAtAxis = cAgent.AtAxis;
m_CameraLeftAxis = cAgent.LeftAxis; m_CameraLeftAxis = cAgent.LeftAxis;
m_CameraUpAxis = cAgent.UpAxis; m_CameraUpAxis = cAgent.UpAxis;
@ -3562,17 +3573,8 @@ if (m_animator.m_jumping) force.Z = m_animator.m_jumpVelocity; // add for ju
Vector3 pVec = AbsolutePosition; Vector3 pVec = AbsolutePosition;
// Old bug where the height was in centimeters instead of meters m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
if (m_avHeight == 127.0f) new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying);
{
m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new Vector3(0f, 0f, 1.56f),
isFlying);
}
else
{
m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
new Vector3(0f, 0f, m_avHeight), isFlying);
}
scene.AddPhysicsActorTaint(m_physicsActor); scene.AddPhysicsActorTaint(m_physicsActor);
//m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;

View File

@ -1135,7 +1135,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); writer.WriteElementString("GroupMask", sop.GroupMask.ToString());
writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString()); writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString());
writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString());
writer.WriteElementString("Flags", sop.Flags.ToString()); WriteFlags(writer, "Flags", sop.Flags.ToString(), options);
WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); WriteUUID(writer, "CollisionSound", sop.CollisionSound, options);
writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
if (sop.MediaUrl != null) if (sop.MediaUrl != null)
@ -1188,6 +1188,20 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
} }
static void WriteFlags(XmlTextWriter writer, string name, string flagsStr, Dictionary<string, object> options)
{
// Older versions of serialization can't cope with commas
if (options.ContainsKey("version"))
{
float version = 0.5F;
float.TryParse(options["version"].ToString(), out version);
if (version < 0.5)
flagsStr = flagsStr.Replace(",", "");
}
writer.WriteElementString(name, flagsStr);
}
static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options)
{ {
if (tinv.Count > 0) // otherwise skip this if (tinv.Count > 0) // otherwise skip this
@ -1275,8 +1289,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString());
writer.WriteElementString("State", shp.State.ToString()); writer.WriteElementString("State", shp.State.ToString());
writer.WriteElementString("ProfileShape", shp.ProfileShape.ToString()); WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options);
writer.WriteElementString("HollowShape", shp.HollowShape.ToString()); WriteFlags(writer, "HollowShape", shp.HollowShape.ToString(), options);
WriteUUID(writer, "SculptTexture", shp.SculptTexture, options); WriteUUID(writer, "SculptTexture", shp.SculptTexture, options);
writer.WriteElementString("SculptType", shp.SculptType.ToString()); writer.WriteElementString("SculptType", shp.SculptType.ToString());

View File

@ -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")

View File

@ -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)

View File

@ -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.
* *
@ -117,7 +117,7 @@ namespace OpenSim.Services.Connectors.Simulation
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message); m_log.Error("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message);
reason = e.Message; reason = e.Message;
return false; return false;
} }
@ -158,13 +158,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;
} }
@ -191,19 +191,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;
} }
@ -231,7 +231,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"))
@ -251,7 +251,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
@ -284,7 +284,7 @@ namespace OpenSim.Services.Connectors.Simulation
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message); m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message);
return false; return false;
} }
//Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri); //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri);
@ -303,7 +303,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());
@ -332,12 +332,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;
} }
@ -348,7 +348,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;
@ -357,19 +357,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
@ -403,7 +403,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());
@ -414,7 +414,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;
} }
@ -455,7 +455,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());
@ -467,7 +467,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
@ -488,7 +488,7 @@ namespace OpenSim.Services.Connectors.Simulation
} }
catch (Exception e) catch (Exception e)
{ {
m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message); m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message);
return false; return false;
} }
@ -506,7 +506,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());
@ -518,7 +518,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
@ -595,11 +595,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
@ -617,7 +617,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;
} }
@ -629,7 +629,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

View File

@ -149,33 +149,28 @@ 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["EyesItem"] = appearance.EyesItem.ToString();
Data["GlovesItem"] = appearance.GlovesItem.ToString();
Data["HairItem"] = appearance.HairItem.ToString();
Data["JacketItem"] = appearance.JacketItem.ToString();
Data["PantsItem"] = appearance.PantsItem.ToString();
Data["ShirtItem"] = appearance.ShirtItem.ToString();
Data["ShoesItem"] = appearance.ShoesItem.ToString();
Data["SkinItem"] = appearance.SkinItem.ToString();
Data["SkirtItem"] = appearance.SkirtItem.ToString();
Data["SocksItem"] = appearance.SocksItem.ToString();
Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString();
Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString();
Data["BodyAsset"] = appearance.BodyAsset.ToString(); for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++)
Data["EyesAsset"] = appearance.EyesAsset.ToString(); {
Data["GlovesAsset"] = appearance.GlovesAsset.ToString(); for (int j = 0 ; j < appearance.Wearables[i].Count ; j++)
Data["HairAsset"] = appearance.HairAsset.ToString(); {
Data["JacketAsset"] = appearance.JacketAsset.ToString(); string fieldName = String.Format("Wearable {0}:{1}", i, j);
Data["PantsAsset"] = appearance.PantsAsset.ToString(); Data[fieldName] = String.Format("{0}:{1}",
Data["ShirtAsset"] = appearance.ShirtAsset.ToString(); appearance.Wearables[i][j].ItemID.ToString(),
Data["ShoesAsset"] = appearance.ShoesAsset.ToString(); appearance.Wearables[i][j].AssetID.ToString());
Data["SkinAsset"] = appearance.SkinAsset.ToString(); }
Data["SkirtAsset"] = appearance.SkirtAsset.ToString(); }
Data["SocksAsset"] = appearance.SocksAsset.ToString();
Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString(); // Visual Params
Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString(); string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT];
byte[] binary = appearance.VisualParams;
for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++)
{
vps[i] = binary[i].ToString();
}
Data["VisualParams"] = String.Join(",", vps);
// Attachments // Attachments
List<AvatarAttachment> attachments = appearance.GetAttachments(); List<AvatarAttachment> attachments = appearance.GetAttachments();
@ -188,38 +183,114 @@ namespace OpenSim.Services.Interfaces
public AvatarAppearance ToAvatarAppearance(UUID owner) public AvatarAppearance ToAvatarAppearance(UUID owner)
{ {
AvatarAppearance appearance = new AvatarAppearance(owner); AvatarAppearance appearance = new AvatarAppearance(owner);
if (Data.Count == 0)
return appearance;
appearance.ClearWearables();
try try
{ {
appearance.Serial = Int32.Parse(Data["Serial"]); if (Data.ContainsKey("Serial"))
appearance.Serial = Int32.Parse(Data["Serial"]);
// Wearables if (Data.ContainsKey("AvatarHeight"))
appearance.BodyItem = UUID.Parse(Data["BodyItem"]); appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]);
appearance.EyesItem = UUID.Parse(Data["EyesItem"]);
appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); // Legacy Wearables
appearance.HairItem = UUID.Parse(Data["HairItem"]); if (Data.ContainsKey("BodyItem"))
appearance.JacketItem = UUID.Parse(Data["JacketItem"]); appearance.Wearables[AvatarWearable.BODY].Wear(
appearance.PantsItem = UUID.Parse(Data["PantsItem"]); UUID.Parse(Data["BodyItem"]),
appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); UUID.Parse(Data["BodyAsset"]));
appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]);
appearance.SkinItem = UUID.Parse(Data["SkinItem"]); if (Data.ContainsKey("SkinItem"))
appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); appearance.Wearables[AvatarWearable.SKIN].Wear(
appearance.SocksItem = UUID.Parse(Data["SocksItem"]); UUID.Parse(Data["SkinItem"]),
appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); UUID.Parse(Data["SkinAsset"]));
appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]);
if (Data.ContainsKey("HairItem"))
appearance.Wearables[AvatarWearable.HAIR].Wear(
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"]));
if (Data.ContainsKey("VisualParams"))
{
string[] vps = Data["VisualParams"].Split(new char[] {','});
byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT];
for (int i = 0 ; i < vps.Length && i < binary.Length ; i++)
binary[i] = (byte)Convert.ToInt32(vps[i]);
appearance.VisualParams = binary;
}
// New style wearables
foreach (KeyValuePair<string, string> _kvp in Data)
{
if (_kvp.Key.StartsWith("Wearable "))
{
string wearIndex = _kvp.Key.Substring(9);
string[] wearIndices = wearIndex.Split(new char[] {':'});
int index = Convert.ToInt32(wearIndices[0]);
string[] ids = _kvp.Value.Split(new char[] {':'});
UUID itemID = new UUID(ids[0]);
UUID assetID = new UUID(ids[1]);
appearance.Wearables[index].Add(itemID, assetID);
}
}
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>();
@ -239,6 +310,26 @@ namespace OpenSim.Services.Interfaces
appearance.SetAttachment(point,uuid,UUID.Zero); appearance.SetAttachment(point,uuid,UUID.Zero);
} }
if (appearance.Wearables[AvatarWearable.BODY].Count == 0)
appearance.Wearables[AvatarWearable.BODY].Wear(
AvatarWearable.DefaultWearables[
AvatarWearable.BODY][0]);
if (appearance.Wearables[AvatarWearable.SKIN].Count == 0)
appearance.Wearables[AvatarWearable.SKIN].Wear(
AvatarWearable.DefaultWearables[
AvatarWearable.SKIN][0]);
if (appearance.Wearables[AvatarWearable.HAIR].Count == 0)
appearance.Wearables[AvatarWearable.HAIR].Wear(
AvatarWearable.DefaultWearables[
AvatarWearable.HAIR][0]);
if (appearance.Wearables[AvatarWearable.EYES].Count == 0)
appearance.Wearables[AvatarWearable.EYES].Wear(
AvatarWearable.DefaultWearables[
AvatarWearable.EYES][0]);
} }
catch catch
{ {

View File

@ -97,7 +97,7 @@ namespace OpenSim.Services.Interfaces
int GetRegionFlags(UUID scopeID, UUID regionID); int GetRegionFlags(UUID scopeID, UUID regionID);
} }
public class GridRegion public class GridRegion : Object
{ {
/// <summary> /// <summary>
@ -225,6 +225,33 @@ namespace OpenSim.Services.Interfaces
EstateOwner = ConvertFrom.EstateOwner; EstateOwner = ConvertFrom.EstateOwner;
} }
# region Definition of equality
/// <summary>
/// Define equality as two regions having the same, non-zero UUID.
/// </summary>
public bool Equals(GridRegion region)
{
if ((object)region == null)
return false;
// Return true if the non-zero UUIDs are equal:
return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID);
}
public override bool Equals(Object obj)
{
if (obj == null)
return false;
return Equals(obj as GridRegion);
}
public override int GetHashCode()
{
return RegionID.GetHashCode() ^ TerrainImage.GetHashCode();
}
#endregion
/// <value> /// <value>
/// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
/// ///

View File

@ -88,7 +88,7 @@ namespace OpenSim.Services.PresenceService
public bool ReportAgent(UUID sessionID, UUID regionID) public bool ReportAgent(UUID sessionID, UUID regionID)
{ {
m_log.DebugFormat("[PRESENCE SERVICE]: ReportAgent with session {0} in region {1}", sessionID, regionID); // m_log.DebugFormat("[PRESENCE SERVICE]: ReportAgent with session {0} in region {1}", sessionID, regionID);
try try
{ {
PresenceData pdata = m_Database.Get(sessionID); PresenceData pdata = m_Database.Get(sessionID);

View File

@ -15,6 +15,85 @@
</summary> </summary>
</member> </member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.DeserializeLLSDBinary(System.Byte[])">
<summary>
Deserializes binary LLSD
</summary>
<param name="binaryData">Serialized data</param>
<returns>OSD containting deserialized data</returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.DeserializeLLSDBinary(System.IO.Stream)">
<summary>
Deserializes binary LLSD
</summary>
<param name="stream">Stream to read the data from</param>
<returns>OSD containting deserialized data</returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.SerializeLLSDBinary(OpenMetaverse.StructuredData.OSD)">
<summary>
</summary>
<param name="osd"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.SerializeLLSDBinaryStream(OpenMetaverse.StructuredData.OSD)">
<summary>
</summary>
<param name="data"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.SkipWhiteSpace(System.IO.Stream)">
<summary>
</summary>
<param name="stream"></param>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.FindByte(System.IO.Stream,System.Byte)">
<summary>
</summary>
<param name="stream"></param>
<param name="toFind"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.FindString(System.IO.Stream,System.String)">
<summary>
</summary>
<param name="stream"></param>
<param name="toFind"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.ConsumeBytes(System.IO.Stream,System.Int32)">
<summary>
</summary>
<param name="stream"></param>
<param name="consumeBytes"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.NetworkToHostInt(System.Byte[])">
<summary>
</summary>
<param name="binaryNetEnd"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.NetworkToHostDouble(System.Byte[])">
<summary>
</summary>
<param name="binaryNetEnd"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.HostToNetworkIntBytes(System.Int32)">
<summary>
</summary>
<param name="intHostEnd"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.DeserializeLLSDXml(System.Byte[])"> <member name="M:OpenMetaverse.StructuredData.OSDParser.DeserializeLLSDXml(System.Byte[])">
<summary> <summary>
@ -133,85 +212,6 @@
<param name="c"></param> <param name="c"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.DeserializeLLSDBinary(System.Byte[])">
<summary>
Deserializes binary LLSD
</summary>
<param name="binaryData">Serialized data</param>
<returns>OSD containting deserialized data</returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.DeserializeLLSDBinary(System.IO.Stream)">
<summary>
Deserializes binary LLSD
</summary>
<param name="stream">Stream to read the data from</param>
<returns>OSD containting deserialized data</returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.SerializeLLSDBinary(OpenMetaverse.StructuredData.OSD)">
<summary>
</summary>
<param name="osd"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.SerializeLLSDBinaryStream(OpenMetaverse.StructuredData.OSD)">
<summary>
</summary>
<param name="data"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.SkipWhiteSpace(System.IO.Stream)">
<summary>
</summary>
<param name="stream"></param>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.FindByte(System.IO.Stream,System.Byte)">
<summary>
</summary>
<param name="stream"></param>
<param name="toFind"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.FindString(System.IO.Stream,System.String)">
<summary>
</summary>
<param name="stream"></param>
<param name="toFind"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.ConsumeBytes(System.IO.Stream,System.Int32)">
<summary>
</summary>
<param name="stream"></param>
<param name="consumeBytes"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.NetworkToHostInt(System.Byte[])">
<summary>
</summary>
<param name="binaryNetEnd"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.NetworkToHostDouble(System.Byte[])">
<summary>
</summary>
<param name="binaryNetEnd"></param>
<returns></returns>
</member>
<member name="M:OpenMetaverse.StructuredData.OSDParser.HostToNetworkIntBytes(System.Int32)">
<summary>
</summary>
<param name="intHostEnd"></param>
<returns></returns>
</member>
<member name="T:OpenMetaverse.StructuredData.OSDType"> <member name="T:OpenMetaverse.StructuredData.OSDType">
<summary> <summary>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -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

View File

@ -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>"

View File

@ -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>"

View File

@ -16,34 +16,6 @@
</Section> </Section>
--> -->
<!-- <!--
<Section Name="Tattoo">
<Key Name="inventoryID" Value="c47e22bd-3021-4ba4-82aa-2b5cb34d35e1" />
<Key Name="assetID" Value="00000000-0000-2222-3333-100000001007" />
<Key Name="folderID" Value="d499e5e0-b9bf-11dc-95ff-0800200c9a66"/>
<Key Name="description" Value="Tattoo" />
<Key Name="name" Value="Tattoo" />
<Key Name="assetType" Value="13" />
<Key Name="inventoryType" Value="18" />
<Key Name="currentPermissions" Value="2147483647" />
<Key Name="nextPermissions" Value="2147483647" />
<Key Name="everyonePermissions" Value="2147483647" />
<Key Name="basePermissions" Value="2147483647" />
</Section>
<Section Name="Alpha">
<Key Name="inventoryID" Value="bfb9923c-4838-4d2d-bf07-608c5b1165c8" />
<Key Name="assetID" Value="1578a2b1-5179-4b53-b618-fe00ca5a5594" />
<Key Name="folderID" Value="d499e5e0-b9bf-11dc-95ff-0800200c9a66"/>
<Key Name="description" Value="Hair" />
<Key Name="name" Value="Hair" />
<Key Name="assetType" Value="13" />
<Key Name="inventoryType" Value="18" />
<Key Name="currentPermissions" Value="2147483647" />
<Key Name="nextPermissions" Value="2147483647" />
<Key Name="everyonePermissions" Value="2147483647" />
<Key Name="basePermissions" Value="2147483647" />
</Section>
<Section Name="Hair"> <Section Name="Hair">
<Key Name="inventoryID" Value="d342e6c1-b9d2-11dc-95ff-0800200c9a66" /> <Key Name="inventoryID" Value="d342e6c1-b9d2-11dc-95ff-0800200c9a66" />
<Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66" /> <Key Name="assetID" Value="d342e6c0-b9d2-11dc-95ff-0800200c9a66" />