diff options
author | Adam Frisby | 2007-06-21 17:08:21 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-21 17:08:21 +0000 |
commit | e93869c7a785a4f375685ffa33c913033ed1c85a (patch) | |
tree | abb5e2c58f8750a1bc05acf58716b6b025da4d15 /tools/mass test client/Commands/Movement/MoveToCommand.cs | |
parent | Fixed the struct and null compare bug. (diff) | |
download | opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.zip opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.tar.gz opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.tar.bz2 opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.tar.xz |
* Importing Ming's mass test client
Diffstat (limited to 'tools/mass test client/Commands/Movement/MoveToCommand.cs')
-rw-r--r-- | tools/mass test client/Commands/Movement/MoveToCommand.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/mass test client/Commands/Movement/MoveToCommand.cs b/tools/mass test client/Commands/Movement/MoveToCommand.cs new file mode 100644 index 0000000..2b3c7d7 --- /dev/null +++ b/tools/mass test client/Commands/Movement/MoveToCommand.cs | |||
@@ -0,0 +1,24 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace libsecondlife.TestClient.Commands.Movement { | ||
6 | class MovetoCommand : Command { | ||
7 | public MovetoCommand(TestClient client) { | ||
8 | Name = "moveto"; | ||
9 | Description = "Moves the avatar to the specified global position using simulator autopilot."; | ||
10 | } | ||
11 | public override string Execute(string[] args, LLUUID fromAgentID) { | ||
12 | if (args.Length != 3) | ||
13 | return "usage: moveto x y z"; | ||
14 | float x = Client.Self.Position.X + Client.regionX; | ||
15 | float y = Client.Self.Position.Y + Client.regionY; | ||
16 | float z = Client.Self.Position.Z; | ||
17 | float.TryParse(args[0], out x); | ||
18 | float.TryParse(args[1], out y); | ||
19 | float.TryParse(args[2], out z); | ||
20 | Client.Self.AutoPilot((ulong)x, (ulong)y, z); | ||
21 | return "Attempting to move to <" + x + ", " + y + ", " + z + ">"; | ||
22 | } | ||
23 | } | ||
24 | } | ||