Files
libremetaverse/libsecondlife/examples/TestClient/Commands/Movement/SitOnCommand.cs
John Hurliman 47f8a88162 * Moved all simulator statistic information to a new struct at Simulator.Stats
* Added per-sim avatar and prim tracking through Simulator.Objects, use Settings.ALWAYS_DECODE_OBJECTS = true to enable
* Handle DisconnectSim packet and don't send CloseCircuit packets on sim-triggered disconnects
* Interpolation timer now does angular velocity and linear movement interpolation for all objects in the object tracker(s)

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1363 52acb1d6-8a22-11de-b505-999d5b087335
2007-08-20 09:26:21 +00:00

44 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
namespace libsecondlife.TestClient
{
public class SitOnCommand : Command
{
public SitOnCommand(TestClient testClient)
{
Name = "siton";
Description = "Attempt to sit on a particular prim, with specified UUID";
}
public override string Execute(string[] args, LLUUID fromAgentID)
{
if (args.Length != 1)
return "Usage: siton UUID";
LLUUID target;
if (LLUUID.TryParse(args[0], out target))
{
lock (Client.Network.CurrentSim.Objects.Prims)
{
foreach (Primitive prim in Client.Network.CurrentSim.Objects.Prims.Values)
{
if (prim.ID == target)
{
Client.Self.RequestSit(prim.ID, LLVector3.Zero);
Client.Self.Sit();
return "Requested to sit on prim " + prim.ID.ToStringHyphenated() +
" (" + prim.LocalID + ")";
}
}
}
}
return "Couldn't find a prim to sit on with UUID " + args[0];
}
}
}