mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
This commit is contained in:
@@ -302,31 +302,26 @@ namespace OpenSim.Framework
|
||||
if (args["start_pos"] != null)
|
||||
Vector3.TryParse(args["start_pos"].AsString(), out startpos);
|
||||
|
||||
// DEBUG ON
|
||||
m_log.WarnFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString());
|
||||
// DEBUG OFF
|
||||
m_log.InfoFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString());
|
||||
|
||||
try {
|
||||
// Unpack various appearance elements
|
||||
Appearance = new AvatarAppearance(AgentID);
|
||||
// Unpack various appearance elements
|
||||
Appearance = new AvatarAppearance(AgentID);
|
||||
|
||||
// Eventually this code should be deprecated, use full appearance
|
||||
// packing in packed_appearance
|
||||
if (args["appearance_serial"] != null)
|
||||
Appearance.Serial = args["appearance_serial"].AsInteger();
|
||||
// Eventually this code should be deprecated, use full appearance
|
||||
// packing in packed_appearance
|
||||
if (args["appearance_serial"] != null)
|
||||
Appearance.Serial = args["appearance_serial"].AsInteger();
|
||||
|
||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
||||
{
|
||||
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
||||
// DEBUG ON
|
||||
m_log.WarnFormat("[AGENTCIRCUITDATA] unpacked appearance");
|
||||
// DEBUG OFF
|
||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
|
||||
{
|
||||
Appearance.Unpack((OSDMap)args["packed_appearance"]);
|
||||
m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
|
||||
}
|
||||
else
|
||||
m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance");
|
||||
}
|
||||
// DEBUG ON
|
||||
else
|
||||
m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance");
|
||||
// DEBUG OFF
|
||||
} catch (Exception e)
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message);
|
||||
}
|
||||
|
||||
@@ -51,8 +51,16 @@ namespace OpenSim.Framework
|
||||
string[] parts = temp.Split('\n');
|
||||
int.TryParse(parts[0].Substring(17, 1), out Version);
|
||||
UUID.TryParse(parts[1].Substring(10, 36), out RegionID);
|
||||
// the vector is stored with spaces as separators, not with commas ("10.3 32.5 43" instead of "10.3, 32.5, 43")
|
||||
Vector3.TryParse(parts[2].Substring(10, parts[2].Length - 10).Replace(" ", ","), out Position);
|
||||
// The position is a vector with spaces as separators ("10.3 32.5 43").
|
||||
// Parse each scalar separately to take into account the system's culture setting.
|
||||
string[] scalars = parts[2].Substring(10, parts[2].Length - 10).Split(' ');
|
||||
if (scalars.Length > 0)
|
||||
System.Single.TryParse(scalars[0], out Position.X);
|
||||
if (scalars.Length > 1)
|
||||
System.Single.TryParse(scalars[1], out Position.Y);
|
||||
if (scalars.Length > 2)
|
||||
System.Single.TryParse(scalars[2], out Position.Z);
|
||||
|
||||
ulong.TryParse(parts[3].Substring(14, parts[3].Length - 14), out RegionHandle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,9 +331,7 @@ namespace OpenSim.Framework
|
||||
|
||||
public virtual OSDMap Pack()
|
||||
{
|
||||
// DEBUG ON
|
||||
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
||||
// DEBUG OFF
|
||||
m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Pack data");
|
||||
|
||||
OSDMap args = new OSDMap();
|
||||
args["message_type"] = OSD.FromString("AgentData");
|
||||
@@ -454,9 +452,7 @@ namespace OpenSim.Framework
|
||||
/// <param name="hash"></param>
|
||||
public virtual void Unpack(OSDMap args)
|
||||
{
|
||||
// DEBUG ON
|
||||
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] Unpack data");
|
||||
// DEBUG OFF
|
||||
m_log.InfoFormat("[CHILDAGENTDATAUPDATE] Unpack data");
|
||||
|
||||
if (args.ContainsKey("region_id"))
|
||||
UUID.TryParse(args["region_id"].AsString(), out RegionID);
|
||||
@@ -613,10 +609,8 @@ namespace OpenSim.Framework
|
||||
|
||||
if (args.ContainsKey("packed_appearance") && (args["packed_appearance"]).Type == OSDType.Map)
|
||||
Appearance = new AvatarAppearance(AgentID,(OSDMap)args["packed_appearance"]);
|
||||
// DEBUG ON
|
||||
else
|
||||
m_log.WarnFormat("[CHILDAGENTDATAUPDATE] No packed appearance");
|
||||
// DEBUG OFF
|
||||
|
||||
if ((args["controllers"] != null) && (args["controllers"]).Type == OSDType.Array)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user