TestClient cleanup
This commit is contained in:
@@ -18,7 +18,7 @@ namespace OpenMetaverse.TestClient
|
||||
|
||||
public override string Execute(string[] args, UUID fromAgentID)
|
||||
{
|
||||
string targetName = String.Empty;
|
||||
string targetName = string.Empty;
|
||||
List<DirectoryManager.AgentSearchData> matches;
|
||||
|
||||
targetName = args.Aggregate(targetName, (current, t) => current + t + " ");
|
||||
@@ -33,7 +33,7 @@ namespace OpenMetaverse.TestClient
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
{
|
||||
UUID target = matches[0].AgentID;
|
||||
targetName += String.Format(" ({0})", target);
|
||||
targetName += $" ({target})";
|
||||
|
||||
if (Client.Appearances.ContainsKey(target))
|
||||
{
|
||||
@@ -41,19 +41,25 @@ namespace OpenMetaverse.TestClient
|
||||
|
||||
AvatarAppearancePacket appearance = Client.Appearances[target];
|
||||
|
||||
AgentSetAppearancePacket set = new AgentSetAppearancePacket();
|
||||
set.AgentData.AgentID = Client.Self.AgentID;
|
||||
set.AgentData.SessionID = Client.Self.SessionID;
|
||||
set.AgentData.SerialNum = SerialNum++;
|
||||
set.AgentData.Size = new Vector3(2f, 2f, 2f); // HACK
|
||||
|
||||
set.WearableData = new AgentSetAppearancePacket.WearableDataBlock[0];
|
||||
set.VisualParam = new AgentSetAppearancePacket.VisualParamBlock[appearance.VisualParam.Length];
|
||||
AgentSetAppearancePacket set = new AgentSetAppearancePacket
|
||||
{
|
||||
AgentData =
|
||||
{
|
||||
AgentID = Client.Self.AgentID,
|
||||
SessionID = Client.Self.SessionID,
|
||||
SerialNum = SerialNum++,
|
||||
Size = new Vector3(2f, 2f, 2f) // HACK
|
||||
},
|
||||
WearableData = Array.Empty<AgentSetAppearancePacket.WearableDataBlock>(),
|
||||
VisualParam = new AgentSetAppearancePacket.VisualParamBlock[appearance.VisualParam.Length]
|
||||
};
|
||||
|
||||
for (int i = 0; i < appearance.VisualParam.Length; i++)
|
||||
{
|
||||
set.VisualParam[i] = new AgentSetAppearancePacket.VisualParamBlock();
|
||||
set.VisualParam[i].ParamValue = appearance.VisualParam[i].ParamValue;
|
||||
set.VisualParam[i] = new AgentSetAppearancePacket.VisualParamBlock
|
||||
{
|
||||
ParamValue = appearance.VisualParam[i].ParamValue
|
||||
};
|
||||
}
|
||||
|
||||
set.ObjectData.TextureEntry = appearance.ObjectData.TextureEntry;
|
||||
|
||||
Reference in New Issue
Block a user