Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
commit
b2aeea66e3
|
@ -117,7 +117,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||||
|
|
||||||
m_application = openSim;
|
m_application = openSim;
|
||||||
string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0");
|
string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0");
|
||||||
IPAddress ipaddr = IPAddress.Parse( bind_ip_address );
|
IPAddress ipaddr = IPAddress.Parse(bind_ip_address);
|
||||||
m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr);
|
m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr);
|
||||||
|
|
||||||
Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>();
|
Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>();
|
||||||
|
|
|
@ -203,7 +203,7 @@ namespace OpenSim.Framework
|
||||||
args["inventory_folder"] = OSD.FromUUID(InventoryFolder);
|
args["inventory_folder"] = OSD.FromUUID(InventoryFolder);
|
||||||
args["secure_session_id"] = OSD.FromUUID(SecureSessionID);
|
args["secure_session_id"] = OSD.FromUUID(SecureSessionID);
|
||||||
args["session_id"] = OSD.FromUUID(SessionID);
|
args["session_id"] = OSD.FromUUID(SessionID);
|
||||||
|
|
||||||
args["service_session_id"] = OSD.FromString(ServiceSessionID);
|
args["service_session_id"] = OSD.FromString(ServiceSessionID);
|
||||||
args["start_pos"] = OSD.FromString(startpos.ToString());
|
args["start_pos"] = OSD.FromString(startpos.ToString());
|
||||||
args["client_ip"] = OSD.FromString(IPAddress);
|
args["client_ip"] = OSD.FromString(IPAddress);
|
||||||
|
@ -219,7 +219,7 @@ namespace OpenSim.Framework
|
||||||
OSDMap appmap = Appearance.Pack();
|
OSDMap appmap = Appearance.Pack();
|
||||||
args["packed_appearance"] = appmap;
|
args["packed_appearance"] = appmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ServiceURLs != null && ServiceURLs.Count > 0)
|
if (ServiceURLs != null && ServiceURLs.Count > 0)
|
||||||
{
|
{
|
||||||
OSDArray urls = new OSDArray(ServiceURLs.Count * 2);
|
OSDArray urls = new OSDArray(ServiceURLs.Count * 2);
|
||||||
|
@ -307,7 +307,7 @@ namespace OpenSim.Framework
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Unpack various appearance elements
|
// Unpack various appearance elements
|
||||||
Appearance = new AvatarAppearance(AgentID);
|
Appearance = new AvatarAppearance(AgentID);
|
||||||
|
|
||||||
// Eventually this code should be deprecated, use full appearance
|
// Eventually this code should be deprecated, use full appearance
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public readonly static int TEXTURE_COUNT = 21;
|
public readonly static int TEXTURE_COUNT = 21;
|
||||||
public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 };
|
public readonly static byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 };
|
||||||
|
|
||||||
protected UUID m_owner;
|
protected UUID m_owner;
|
||||||
protected int m_serial = 1;
|
protected int m_serial = 1;
|
||||||
protected byte[] m_visualparams;
|
protected byte[] m_visualparams;
|
||||||
|
@ -110,10 +110,10 @@ namespace OpenSim.Framework
|
||||||
SetDefaultTexture();
|
SetDefaultTexture();
|
||||||
SetDefaultParams();
|
SetDefaultParams();
|
||||||
SetHeight();
|
SetHeight();
|
||||||
|
|
||||||
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AvatarAppearance(UUID avatarID, OSDMap map)
|
public AvatarAppearance(UUID avatarID, OSDMap map)
|
||||||
{
|
{
|
||||||
// m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID);
|
// m_log.WarnFormat("[AVATAR APPEARANCE]: create appearance for {0} from OSDMap",avatarID);
|
||||||
|
@ -122,11 +122,11 @@ namespace OpenSim.Framework
|
||||||
Unpack(map);
|
Unpack(map);
|
||||||
SetHeight();
|
SetHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams)
|
public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry, byte[] visualParams)
|
||||||
{
|
{
|
||||||
// m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);
|
// m_log.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);
|
||||||
|
|
||||||
m_serial = 1;
|
m_serial = 1;
|
||||||
m_owner = avatarID;
|
m_owner = avatarID;
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ namespace OpenSim.Framework
|
||||||
m_wearables = wearables;
|
m_wearables = wearables;
|
||||||
else
|
else
|
||||||
SetDefaultWearables();
|
SetDefaultWearables();
|
||||||
|
|
||||||
if (textureEntry != null)
|
if (textureEntry != null)
|
||||||
m_texture = textureEntry;
|
m_texture = textureEntry;
|
||||||
else
|
else
|
||||||
|
@ -172,41 +172,41 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_serial = appearance.Serial;
|
m_serial = appearance.Serial;
|
||||||
m_owner = appearance.Owner;
|
m_owner = appearance.Owner;
|
||||||
|
|
||||||
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
||||||
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
|
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||||
m_wearables[i] = new AvatarWearable();
|
m_wearables[i] = new AvatarWearable();
|
||||||
if (copyWearables && (appearance.Wearables != null))
|
if (copyWearables && (appearance.Wearables != null))
|
||||||
{
|
{
|
||||||
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]);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_texture = null;
|
m_texture = null;
|
||||||
if (appearance.Texture != null)
|
if (appearance.Texture != null)
|
||||||
{
|
{
|
||||||
byte[] tbytes = appearance.Texture.GetBytes();
|
byte[] tbytes = appearance.Texture.GetBytes();
|
||||||
m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length);
|
m_texture = new Primitive.TextureEntry(tbytes,0,tbytes.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_visualparams = null;
|
m_visualparams = null;
|
||||||
if (appearance.VisualParams != null)
|
if (appearance.VisualParams != null)
|
||||||
m_visualparams = (byte[])appearance.VisualParams.Clone();
|
m_visualparams = (byte[])appearance.VisualParams.Clone();
|
||||||
|
|
||||||
// Copy the attachment, force append mode since that ensures consistency
|
// Copy the attachment, force append mode since that ensures consistency
|
||||||
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
|
||||||
foreach (AvatarAttachment attachment in appearance.GetAttachments())
|
foreach (AvatarAttachment attachment in appearance.GetAttachments())
|
||||||
AppendAttachment(new AvatarAttachment(attachment));
|
AppendAttachment(new AvatarAttachment(attachment));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GetAssetsFrom(AvatarAppearance app)
|
public void GetAssetsFrom(AvatarAppearance app)
|
||||||
{
|
{
|
||||||
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
|
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0 ; j < m_wearables[i].Count ; j++)
|
for (int j = 0; j < m_wearables[i].Count; j++)
|
||||||
{
|
{
|
||||||
UUID itemID = m_wearables[i][j].ItemID;
|
UUID itemID = m_wearables[i][j].ItemID;
|
||||||
UUID assetID = app.Wearables[i].GetAsset(itemID);
|
UUID assetID = app.Wearables[i].GetAsset(itemID);
|
||||||
|
@ -220,7 +220,7 @@ namespace OpenSim.Framework
|
||||||
public void ClearWearables()
|
public void ClearWearables()
|
||||||
{
|
{
|
||||||
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES];
|
||||||
for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++ )
|
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||||
m_wearables[i] = new AvatarWearable();
|
m_wearables[i] = new AvatarWearable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ namespace OpenSim.Framework
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set up appearance textures.
|
/// Set up appearance textures.
|
||||||
/// Returns boolean that indicates whether the new entries actually change the
|
/// Returns boolean that indicates whether the new entries actually change the
|
||||||
/// existing values.
|
/// existing values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry)
|
public virtual bool SetTextureEntries(Primitive.TextureEntry textureEntry)
|
||||||
{
|
{
|
||||||
|
@ -263,7 +263,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i];
|
Primitive.TextureEntryFace newface = textureEntry.FaceTextures[i];
|
||||||
Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i];
|
Primitive.TextureEntryFace oldface = m_texture.FaceTextures[i];
|
||||||
|
|
||||||
if (newface == null)
|
if (newface == null)
|
||||||
{
|
{
|
||||||
if (oldface == null) continue;
|
if (oldface == null) continue;
|
||||||
|
@ -274,7 +274,7 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
|
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
||||||
// 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);
|
||||||
}
|
}
|
||||||
|
@ -282,11 +282,11 @@ namespace OpenSim.Framework
|
||||||
m_texture = textureEntry;
|
m_texture = textureEntry;
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set up visual parameters for the avatar and refresh the avatar height
|
/// Set up visual parameters for the avatar and refresh the avatar height
|
||||||
/// Returns boolean that indicates whether the new entries actually change the
|
/// Returns boolean that indicates whether the new entries actually change the
|
||||||
/// existing values.
|
/// existing values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual bool SetVisualParams(byte[] visualParams)
|
public virtual bool SetVisualParams(byte[] visualParams)
|
||||||
{
|
{
|
||||||
|
@ -316,13 +316,13 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
|
public virtual void SetAppearance(Primitive.TextureEntry textureEntry, byte[] visualParams)
|
||||||
{
|
{
|
||||||
SetTextureEntries(textureEntry);
|
SetTextureEntries(textureEntry);
|
||||||
SetVisualParams(visualParams);
|
SetVisualParams(visualParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void SetHeight()
|
public virtual void SetHeight()
|
||||||
{
|
{
|
||||||
m_avatarHeight = 1.23077f // Shortest possible avatar height
|
m_avatarHeight = 1.23077f // Shortest possible avatar height
|
||||||
|
@ -347,25 +347,24 @@ namespace OpenSim.Framework
|
||||||
// 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].Clear();
|
m_wearables[wearableId].Clear();
|
||||||
for (int i = 0 ; i < wearable.Count ; i++)
|
for (int i = 0; i < wearable.Count; i++)
|
||||||
m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
|
m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// DEBUG ON
|
// DEBUG ON
|
||||||
public override String ToString()
|
public override String ToString()
|
||||||
{
|
{
|
||||||
String s = "";
|
String s = "";
|
||||||
|
|
||||||
s += String.Format("Serial: {0}\n",m_serial);
|
s += String.Format("Serial: {0}\n",m_serial);
|
||||||
|
|
||||||
for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
|
for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
|
||||||
if (m_texture.FaceTextures[i] != null)
|
if (m_texture.FaceTextures[i] != null)
|
||||||
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)
|
||||||
{
|
{
|
||||||
for ( int i = 0 ; i < awear.Count ; i++ )
|
for (int i = 0; i < awear.Count; i++)
|
||||||
s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID);
|
s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -373,13 +372,13 @@ namespace OpenSim.Framework
|
||||||
for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++)
|
for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++)
|
||||||
s += String.Format("{0},",m_visualparams[j]);
|
s += String.Format("{0},",m_visualparams[j]);
|
||||||
s += "\n";
|
s += "\n";
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get a list of the attachments, note that there may be
|
/// Get a list of the attachments, note that there may be
|
||||||
/// duplicate attachpoints
|
/// duplicate attachpoints
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<AvatarAttachment> GetAttachments()
|
public List<AvatarAttachment> GetAttachments()
|
||||||
|
@ -390,10 +389,10 @@ namespace OpenSim.Framework
|
||||||
foreach (AvatarAttachment attach in kvp.Value)
|
foreach (AvatarAttachment attach in kvp.Value)
|
||||||
alist.Add(new AvatarAttachment(attach));
|
alist.Add(new AvatarAttachment(attach));
|
||||||
}
|
}
|
||||||
|
|
||||||
return alist;
|
return alist;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void AppendAttachment(AvatarAttachment attach)
|
internal void AppendAttachment(AvatarAttachment attach)
|
||||||
{
|
{
|
||||||
if (! m_attachments.ContainsKey(attach.AttachPoint))
|
if (! m_attachments.ContainsKey(attach.AttachPoint))
|
||||||
|
@ -406,11 +405,11 @@ namespace OpenSim.Framework
|
||||||
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
|
m_attachments[attach.AttachPoint] = new List<AvatarAttachment>();
|
||||||
m_attachments[attach.AttachPoint].Add(attach);
|
m_attachments[attach.AttachPoint].Add(attach);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add an attachment, if the attachpoint has the
|
/// Add an attachment, if the attachpoint has the
|
||||||
/// 0x80 bit set then we assume this is an append
|
/// 0x80 bit set then we assume this is an append
|
||||||
/// operation otherwise we replace whatever is
|
/// operation otherwise we replace whatever is
|
||||||
/// currently attached at the attachpoint
|
/// currently attached at the attachpoint
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SetAttachment(int attachpoint, UUID item, UUID asset)
|
public void SetAttachment(int attachpoint, UUID item, UUID asset)
|
||||||
|
@ -485,14 +484,14 @@ namespace OpenSim.Framework
|
||||||
data["serial"] = OSD.FromInteger(m_serial);
|
data["serial"] = OSD.FromInteger(m_serial);
|
||||||
data["height"] = OSD.FromReal(m_avatarHeight);
|
data["height"] = OSD.FromReal(m_avatarHeight);
|
||||||
data["hipoffset"] = OSD.FromReal(m_hipOffset);
|
data["hipoffset"] = OSD.FromReal(m_hipOffset);
|
||||||
|
|
||||||
// Wearables
|
// Wearables
|
||||||
OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES);
|
OSDArray wears = new OSDArray(AvatarWearable.MAX_WEARABLES);
|
||||||
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||||
wears.Add(m_wearables[i].Pack());
|
wears.Add(m_wearables[i].Pack());
|
||||||
data["wearables"] = wears;
|
data["wearables"] = wears;
|
||||||
|
|
||||||
// Avatar Textures
|
// Avatar Textures
|
||||||
OSDArray textures = new OSDArray(AvatarAppearance.TEXTURE_COUNT);
|
OSDArray textures = new OSDArray(AvatarAppearance.TEXTURE_COUNT);
|
||||||
for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
|
for (uint i = 0; i < AvatarAppearance.TEXTURE_COUNT; i++)
|
||||||
{
|
{
|
||||||
|
@ -506,7 +505,7 @@ namespace OpenSim.Framework
|
||||||
// Visual Parameters
|
// Visual Parameters
|
||||||
OSDBinary visualparams = new OSDBinary(m_visualparams);
|
OSDBinary visualparams = new OSDBinary(m_visualparams);
|
||||||
data["visualparams"] = visualparams;
|
data["visualparams"] = visualparams;
|
||||||
|
|
||||||
// Attachments
|
// Attachments
|
||||||
OSDArray attachs = new OSDArray(m_attachments.Count);
|
OSDArray attachs = new OSDArray(m_attachments.Count);
|
||||||
foreach (AvatarAttachment attach in GetAttachments())
|
foreach (AvatarAttachment attach in GetAttachments())
|
||||||
|
@ -529,14 +528,14 @@ namespace OpenSim.Framework
|
||||||
if ((data != null) && (data["hipoffset"] != null))
|
if ((data != null) && (data["hipoffset"] != null))
|
||||||
m_hipOffset = (float)data["hipoffset"].AsReal();
|
m_hipOffset = (float)data["hipoffset"].AsReal();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Wearables
|
// Wearables
|
||||||
SetDefaultWearables();
|
SetDefaultWearables();
|
||||||
if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array)
|
if ((data != null) && (data["wearables"] != null) && (data["wearables"]).Type == OSDType.Array)
|
||||||
{
|
{
|
||||||
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((OSDArray)wears[i]);
|
m_wearables[i] = new AvatarWearable((OSDArray)wears[i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -333,7 +333,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
// DEBUG ON
|
// DEBUG ON
|
||||||
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
|
|
||||||
OSDMap args = new OSDMap();
|
OSDMap args = new OSDMap();
|
||||||
args["message_type"] = OSD.FromString("AgentData");
|
args["message_type"] = OSD.FromString("AgentData");
|
||||||
|
@ -456,7 +456,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
// DEBUG ON
|
// DEBUG ON
|
||||||
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data");
|
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data");
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
|
|
||||||
if (args.ContainsKey("region_id"))
|
if (args.ContainsKey("region_id"))
|
||||||
UUID.TryParse(args["region_id"].AsString(), out RegionID);
|
UUID.TryParse(args["region_id"].AsString(), out RegionID);
|
||||||
|
@ -616,7 +616,7 @@ namespace OpenSim.Framework
|
||||||
// DEBUG ON
|
// DEBUG ON
|
||||||
else
|
else
|
||||||
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance");
|
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance");
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
|
|
||||||
if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array)
|
if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace OpenSim.Framework
|
||||||
public class MainServer
|
public class MainServer
|
||||||
{
|
{
|
||||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private static BaseHttpServer instance = null;
|
private static BaseHttpServer instance = null;
|
||||||
private static Dictionary<uint, BaseHttpServer> m_Servers =
|
private static Dictionary<uint, BaseHttpServer> m_Servers =
|
||||||
new Dictionary<uint, BaseHttpServer>();
|
new Dictionary<uint, BaseHttpServer>();
|
||||||
|
@ -64,8 +64,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
m_Servers[port] = new BaseHttpServer(port);
|
m_Servers[port] = new BaseHttpServer(port);
|
||||||
|
|
||||||
if (ipaddr != null )
|
if (ipaddr != null)
|
||||||
m_Servers[port].ListenIPAddress = ipaddr;
|
m_Servers[port].ListenIPAddress = ipaddr;
|
||||||
|
|
||||||
m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
|
m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
|
||||||
m_Servers[port].Start();
|
m_Servers[port].Start();
|
||||||
|
|
|
@ -615,7 +615,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
// UseCircuitCode handling
|
// UseCircuitCode handling
|
||||||
if (packet.Type == PacketType.UseCircuitCode)
|
if (packet.Type == PacketType.UseCircuitCode)
|
||||||
{
|
{
|
||||||
object[] array = new object[] { buffer, packet };
|
object[] array = new object[] { buffer, packet };
|
||||||
|
|
||||||
if (m_asyncPacketHandling)
|
if (m_asyncPacketHandling)
|
||||||
|
@ -843,7 +843,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
|
"[LLUDPSERVER]: Handling UseCircuitCode request from {0} took {1}ms",
|
||||||
buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
|
buffer.RemoteEndPoint, (DateTime.Now - startTime).Milliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber)
|
private void SendAckImmediate(IPEndPoint remoteEndpoint, uint sequenceNumber)
|
||||||
|
|
|
@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
UUID itemID = UUID.Zero;
|
UUID itemID = UUID.Zero;
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
{
|
||||||
foreach(SceneObjectGroup grp in sp.Attachments)
|
foreach (SceneObjectGroup grp in sp.Attachments)
|
||||||
{
|
{
|
||||||
if (grp.GetAttachmentPoint() == (byte)AttachmentPt)
|
if (grp.GetAttachmentPoint() == (byte)AttachmentPt)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
{
|
{
|
||||||
scene.RegisterModuleInterface<IAvatarFactory>(this);
|
scene.RegisterModuleInterface<IAvatarFactory>(this);
|
||||||
scene.EventManager.OnNewClient += NewClient;
|
scene.EventManager.OnNewClient += NewClient;
|
||||||
|
|
||||||
if (config != null)
|
if (config != null)
|
||||||
{
|
{
|
||||||
IConfig sconfig = config.Configs["Startup"];
|
IConfig sconfig = config.Configs["Startup"];
|
||||||
|
@ -138,7 +138,6 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
|
|
||||||
return cached;
|
return cached;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set appearance data (textureentry and slider settings) received from the client
|
/// Set appearance data (textureentry and slider settings) received from the client
|
||||||
|
@ -155,9 +154,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
m_log.WarnFormat("[AVATAR FACTORY MODULE]: 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
|
|
||||||
// Process the texture entry
|
// Process the texture entry
|
||||||
if (textureEntry != null)
|
if (textureEntry != null)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process the visual params, this may change height as well
|
// Process the visual params, this may change height as well
|
||||||
if (visualParams != null)
|
if (visualParams != null)
|
||||||
{
|
{
|
||||||
|
@ -185,14 +184,14 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
sp.SetHeight(sp.Appearance.AvatarHeight);
|
sp.SetHeight(sp.Appearance.AvatarHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If something changed in the appearance then queue an appearance save
|
// If something changed in the appearance then queue an appearance save
|
||||||
if (changed)
|
if (changed)
|
||||||
QueueAppearanceSave(client.AgentId);
|
QueueAppearanceSave(client.AgentId);
|
||||||
|
|
||||||
// And always queue up an appearance update to send out
|
// And always queue up an appearance update to send out
|
||||||
QueueAppearanceSend(client.AgentId);
|
QueueAppearanceSend(client.AgentId);
|
||||||
|
|
||||||
// Send the appearance back to the avatar
|
// Send the appearance back to the avatar
|
||||||
// AvatarAppearance avp = sp.Appearance;
|
// AvatarAppearance avp = sp.Appearance;
|
||||||
// sp.ControllingClient.SendAvatarDataImmediate(sp);
|
// sp.ControllingClient.SendAvatarDataImmediate(sp);
|
||||||
|
@ -216,35 +215,35 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region UpdateAppearanceTimer
|
#region UpdateAppearanceTimer
|
||||||
|
|
||||||
public void QueueAppearanceSend(UUID agentid)
|
public void QueueAppearanceSend(UUID agentid)
|
||||||
{
|
{
|
||||||
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}",agentid);
|
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance send for {0}", agentid);
|
||||||
|
|
||||||
// 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);
|
||||||
lock (m_sendqueue)
|
lock (m_sendqueue)
|
||||||
{
|
{
|
||||||
m_sendqueue[agentid] = timestamp;
|
m_sendqueue[agentid] = timestamp;
|
||||||
m_updateTimer.Start();
|
m_updateTimer.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void QueueAppearanceSave(UUID agentid)
|
public void QueueAppearanceSave(UUID agentid)
|
||||||
{
|
{
|
||||||
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}",agentid);
|
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Queue appearance save for {0}", agentid);
|
||||||
|
|
||||||
// 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);
|
||||||
lock (m_savequeue)
|
lock (m_savequeue)
|
||||||
{
|
{
|
||||||
m_savequeue[agentid] = timestamp;
|
m_savequeue[agentid] = timestamp;
|
||||||
m_updateTimer.Start();
|
m_updateTimer.Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleAppearanceSend(UUID agentid)
|
private void HandleAppearanceSend(UUID agentid)
|
||||||
{
|
{
|
||||||
ScenePresence sp = m_scene.GetScenePresence(agentid);
|
ScenePresence sp = m_scene.GetScenePresence(agentid);
|
||||||
|
@ -254,7 +253,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid);
|
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Handle appearance send for {0}", agentid);
|
||||||
|
|
||||||
// Send the appearance to everyone in the scene
|
// Send the appearance to everyone in the scene
|
||||||
sp.SendAppearanceToAllOtherAgents();
|
sp.SendAppearanceToAllOtherAgents();
|
||||||
|
@ -262,7 +261,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
|
|
||||||
// Send the appearance back to the avatar
|
// Send the appearance back to the avatar
|
||||||
// AvatarAppearance avp = sp.Appearance;
|
// AvatarAppearance avp = sp.Appearance;
|
||||||
// sp.ControllingClient.SendAppearance(avp.Owner,avp.VisualParams,avp.Texture.GetBytes());
|
// sp.ControllingClient.SendAppearance(avp.Owner, avp.VisualParams, avp.Texture.GetBytes());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// this needs to be fixed, the flag should be on scene presence not the region module
|
// this needs to be fixed, the flag should be on scene presence not the region module
|
||||||
|
@ -290,11 +289,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
private void HandleAppearanceUpdateTimer(object sender, EventArgs ea)
|
private void HandleAppearanceUpdateTimer(object sender, EventArgs ea)
|
||||||
{
|
{
|
||||||
long now = DateTime.Now.Ticks;
|
long now = DateTime.Now.Ticks;
|
||||||
|
|
||||||
lock (m_sendqueue)
|
lock (m_sendqueue)
|
||||||
{
|
{
|
||||||
Dictionary<UUID,long> sends = new Dictionary<UUID,long>(m_sendqueue);
|
Dictionary<UUID, long> sends = new Dictionary<UUID, long>(m_sendqueue);
|
||||||
foreach (KeyValuePair<UUID,long> kvp in sends)
|
foreach (KeyValuePair<UUID, long> kvp in sends)
|
||||||
{
|
{
|
||||||
if (kvp.Value < now)
|
if (kvp.Value < now)
|
||||||
{
|
{
|
||||||
|
@ -306,8 +305,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
|
|
||||||
lock (m_savequeue)
|
lock (m_savequeue)
|
||||||
{
|
{
|
||||||
Dictionary<UUID,long> saves = new Dictionary<UUID,long>(m_savequeue);
|
Dictionary<UUID, long> saves = new Dictionary<UUID, long>(m_savequeue);
|
||||||
foreach (KeyValuePair<UUID,long> kvp in saves)
|
foreach (KeyValuePair<UUID, long> kvp in saves)
|
||||||
{
|
{
|
||||||
if (kvp.Value < now)
|
if (kvp.Value < now)
|
||||||
{
|
{
|
||||||
|
@ -320,7 +319,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
if (m_savequeue.Count == 0 && m_sendqueue.Count == 0)
|
if (m_savequeue.Count == 0 && m_sendqueue.Count == 0)
|
||||||
m_updateTimer.Stop();
|
m_updateTimer.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -336,8 +335,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId);
|
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: Received request for wearables of {0}", client.AgentId);
|
||||||
|
|
||||||
client.SendWearables(sp.Appearance.Wearables,sp.Appearance.Serial++);
|
client.SendWearables(sp.Appearance.Wearables, sp.Appearance.Serial++);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -353,17 +352,17 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
m_log.WarnFormat("[AVATAR FACTORY MODULE]: 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}",client.AgentId);
|
// m_log.WarnFormat("[AVATAR FACTORY MODULE]: AvatarIsWearing called for {0}", client.AgentId);
|
||||||
|
|
||||||
AvatarAppearance avatAppearance = new AvatarAppearance(sp.Appearance, false);
|
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);
|
avatAppearance.Wearables[wear.Type].Add(wear.ItemID, UUID.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
avatAppearance.GetAssetsFrom(sp.Appearance);
|
avatAppearance.GetAssetsFrom(sp.Appearance);
|
||||||
|
|
||||||
// This could take awhile since it needs to pull inventory
|
// This could take awhile since it needs to pull inventory
|
||||||
|
@ -381,11 +380,11 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
{
|
{
|
||||||
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
|
||||||
{
|
{
|
||||||
for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ )
|
for (int j = 0; j < appearance.Wearables[j].Count; j++)
|
||||||
{
|
{
|
||||||
if (appearance.Wearables[i][j].ItemID == UUID.Zero)
|
if (appearance.Wearables[i][j].ItemID == UUID.Zero)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Ignore ruth's assets
|
// Ignore ruth's assets
|
||||||
if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID)
|
if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][0].ItemID)
|
||||||
continue;
|
continue;
|
||||||
|
@ -399,9 +398,9 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default",
|
"[AVATAR FACTORY MODULE]: Can't find inventory item {0} for {1}, setting to default",
|
||||||
appearance.Wearables[i][j].ItemID, (WearableType)i);
|
appearance.Wearables[i][j].ItemID, (WearableType)i);
|
||||||
|
|
||||||
appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID);
|
appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1115,12 +1115,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
|
if (m_scene.RegionInfo.RegionSettings.AllowLandJoinDivide)
|
||||||
flags |= RegionFlags.AllowParcelChanges;
|
flags |= RegionFlags.AllowParcelChanges;
|
||||||
if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
|
if (m_scene.RegionInfo.RegionSettings.BlockShowInSearch)
|
||||||
flags |= (RegionFlags)(1 << 29);
|
flags |= RegionFlags.BlockParcelSearch;
|
||||||
|
|
||||||
if (m_scene.RegionInfo.RegionSettings.FixedSun)
|
if (m_scene.RegionInfo.RegionSettings.FixedSun)
|
||||||
flags |= RegionFlags.SunFixed;
|
flags |= RegionFlags.SunFixed;
|
||||||
if (m_scene.RegionInfo.RegionSettings.Sandbox)
|
if (m_scene.RegionInfo.RegionSettings.Sandbox)
|
||||||
flags |= RegionFlags.Sandbox;
|
flags |= RegionFlags.Sandbox;
|
||||||
|
if (m_scene.RegionInfo.EstateSettings.AllowVoice)
|
||||||
|
flags |= RegionFlags.AllowVoice;
|
||||||
|
|
||||||
// Fudge these to always on, so the menu options activate
|
// Fudge these to always on, so the menu options activate
|
||||||
//
|
//
|
||||||
|
|
|
@ -90,7 +90,8 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
// caches ExtendedLandData
|
// caches ExtendedLandData
|
||||||
private Cache parcelInfoCache;
|
private Cache parcelInfoCache;
|
||||||
private Vector3? forcedPosition = null;
|
private Dictionary<UUID, Vector3> forcedPosition =
|
||||||
|
new Dictionary<UUID, Vector3>();
|
||||||
|
|
||||||
#region INonSharedRegionModule Members
|
#region INonSharedRegionModule Members
|
||||||
|
|
||||||
|
@ -185,7 +186,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
void ClientOnPreAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
||||||
{
|
{
|
||||||
//If we are forcing a position for them to go
|
//If we are forcing a position for them to go
|
||||||
if (forcedPosition != null)
|
if (forcedPosition.ContainsKey(remoteClient.AgentId))
|
||||||
{
|
{
|
||||||
ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId);
|
ScenePresence clientAvatar = m_scene.GetScenePresence(remoteClient.AgentId);
|
||||||
|
|
||||||
|
@ -195,23 +196,23 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
|
|
||||||
//Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines
|
//Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines
|
||||||
if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) < .2)
|
if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2)
|
||||||
{
|
{
|
||||||
Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition));
|
Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition));
|
||||||
forcedPosition = null;
|
forcedPosition.Remove(remoteClient.AgentId);
|
||||||
}
|
}
|
||||||
//if we are far away, teleport
|
//if we are far away, teleport
|
||||||
else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3)
|
else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3)
|
||||||
{
|
{
|
||||||
Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition));
|
Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition));
|
||||||
clientAvatar.Teleport(forcedPosition.Value);
|
clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]);
|
||||||
forcedPosition = null;
|
forcedPosition.Remove(remoteClient.AgentId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Forces them toward the forced position we want if they aren't there yet
|
//Forces them toward the forced position we want if they aren't there yet
|
||||||
agentData.UseClientAgentPosition = true;
|
agentData.UseClientAgentPosition = true;
|
||||||
agentData.ClientAgentPosition = forcedPosition.Value;
|
agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,7 +335,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
if (m_scene.Permissions.IsGod(avatar.UUID)) return;
|
if (m_scene.Permissions.IsGod(avatar.UUID)) return;
|
||||||
if (position.HasValue)
|
if (position.HasValue)
|
||||||
{
|
{
|
||||||
forcedPosition = position;
|
forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +466,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
parcel.IsBannedFromLand(clientAvatar.UUID))
|
parcel.IsBannedFromLand(clientAvatar.UUID))
|
||||||
{
|
{
|
||||||
//once we've sent the message once, keep going toward the target until we are done
|
//once we've sent the message once, keep going toward the target until we are done
|
||||||
if (forcedPosition == null)
|
if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
|
||||||
{
|
{
|
||||||
SendYouAreBannedNotice(clientAvatar);
|
SendYouAreBannedNotice(clientAvatar);
|
||||||
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
||||||
|
@ -474,7 +475,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
else if (parcel.IsRestrictedFromLand(clientAvatar.UUID))
|
else if (parcel.IsRestrictedFromLand(clientAvatar.UUID))
|
||||||
{
|
{
|
||||||
//once we've sent the message once, keep going toward the target until we are done
|
//once we've sent the message once, keep going toward the target until we are done
|
||||||
if (forcedPosition == null)
|
if (forcedPosition.ContainsKey(clientAvatar.ControllingClient.AgentId))
|
||||||
{
|
{
|
||||||
SendYouAreRestrictedNotice(clientAvatar);
|
SendYouAreRestrictedNotice(clientAvatar);
|
||||||
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
ForceAvatarToPosition(clientAvatar, m_scene.GetNearestAllowedPosition(clientAvatar));
|
||||||
|
@ -483,7 +484,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//when we are finally in a safe place, lets release the forced position lock
|
//when we are finally in a safe place, lets release the forced position lock
|
||||||
forcedPosition = null;
|
forcedPosition.Remove(clientAvatar.ControllingClient.AgentId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// TODO: need to figure out how allow client agents but deny
|
// TODO: need to figure out how allow client agents but deny
|
||||||
// root agents when ACL denies access to root agent
|
// root agents when ACL denies access to root agent
|
||||||
public bool m_strictAccessControl = true;
|
public bool m_strictAccessControl = true;
|
||||||
|
public bool m_seeIntoBannedRegion = false;
|
||||||
public int MaxUndoCount = 5;
|
public int MaxUndoCount = 5;
|
||||||
public bool LoginsDisabled = true;
|
public bool LoginsDisabled = true;
|
||||||
public bool LoadingPrims;
|
public bool LoadingPrims;
|
||||||
|
@ -683,6 +684,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
|
m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
|
||||||
|
m_seeIntoBannedRegion = startupConfig.GetBoolean("SeeIntoBannedRegion", m_seeIntoBannedRegion);
|
||||||
CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
|
CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
|
||||||
|
|
||||||
m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true);
|
m_generateMaptiles = startupConfig.GetBoolean("GenerateMaptiles", true);
|
||||||
|
@ -3688,7 +3690,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
if (m_regInfo.EstateSettings != null)
|
if (m_regInfo.EstateSettings != null)
|
||||||
{
|
{
|
||||||
if (m_regInfo.EstateSettings.IsBanned(agent.AgentID))
|
if ((!m_seeIntoBannedRegion) && m_regInfo.EstateSettings.IsBanned(agent.AgentID))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
|
m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user is on the banlist",
|
||||||
agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
|
agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName);
|
||||||
|
@ -3878,6 +3880,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// We have to wait until the viewer contacts this region after receiving EAC.
|
// We have to wait until the viewer contacts this region after receiving EAC.
|
||||||
// That calls AddNewClient, which finally creates the ScenePresence
|
// That calls AddNewClient, which finally creates the ScenePresence
|
||||||
|
if (m_regInfo.EstateSettings.IsBanned(cAgentData.AgentID))
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: banned", cAgentData.AgentID);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2);
|
||||||
|
if (nearestParcel == null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int num = m_sceneGraph.GetNumberOfScenePresences();
|
int num = m_sceneGraph.GetNumberOfScenePresences();
|
||||||
|
|
||||||
if (num >= RegionInfo.RegionSettings.AgentLimit)
|
if (num >= RegionInfo.RegionSettings.AgentLimit)
|
||||||
|
@ -4878,7 +4893,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar);
|
Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar);
|
||||||
//Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString());
|
//Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString());
|
||||||
return nearestRegionEdgePoint;
|
return nearestRegionEdgePoint;
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector3 GetParcelCenterAtGround(ILandObject parcel)
|
private Vector3 GetParcelCenterAtGround(ILandObject parcel)
|
||||||
|
|
|
@ -1272,7 +1272,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_log.DebugFormat(
|
m_log.DebugFormat(
|
||||||
"[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
|
"[SCENE PRESENCE]: Completing movement of {0} into region {1} took {2}ms",
|
||||||
client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
|
client.Name, Scene.RegionInfo.RegionName, (DateTime.Now - startTime).Milliseconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -125,7 +125,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs);
|
||||||
if (response["Success"].AsBoolean())
|
if (response["Success"].AsBoolean())
|
||||||
{
|
{
|
||||||
OSDMap map = null;
|
OSDMap map = null;
|
||||||
try { map = OSDParser.DeserializeJson(response["LLPackedAppearance"].AsString()) as OSDMap; }
|
try { map = OSDParser.DeserializeJson(response["LLPackedAppearance"].AsString()) as OSDMap; }
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
AvatarAppearance appearance = new AvatarAppearance(map);
|
AvatarAppearance appearance = new AvatarAppearance(map);
|
||||||
// DEBUG ON
|
// DEBUG ON
|
||||||
m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] retrieved appearance for {0}:\n{1}",userID,appearance.ToString());
|
m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] retrieved appearance for {0}:\n{1}",userID,appearance.ToString());
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
return appearance;
|
return appearance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
|
|
||||||
// DEBUG ON
|
// DEBUG ON
|
||||||
m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] save appearance for {0}",userID);
|
m_log.WarnFormat("[SIMIAN AVATAR CONNECTOR] save appearance for {0}",userID);
|
||||||
// DEBUG OFF
|
// DEBUG OFF
|
||||||
|
|
||||||
NameValueCollection requestArgs = new NameValueCollection
|
NameValueCollection requestArgs = new NameValueCollection
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue