diff options
author | gareth | 2007-05-08 00:10:04 +0000 |
---|---|---|
committer | gareth | 2007-05-08 00:10:04 +0000 |
commit | 5b6afeafbc249ba88dcc20d1fbc98ce12418b21b (patch) | |
tree | 78861e5f6ae871d63c83b4ab1cc4c55ea184ed6d /ExportBot/Commands/Movement/MoveToCommand.cs | |
parent | ZOMG! (diff) | |
download | opensim-SC_OLD-5b6afeafbc249ba88dcc20d1fbc98ce12418b21b.zip opensim-SC_OLD-5b6afeafbc249ba88dcc20d1fbc98ce12418b21b.tar.gz opensim-SC_OLD-5b6afeafbc249ba88dcc20d1fbc98ce12418b21b.tar.bz2 opensim-SC_OLD-5b6afeafbc249ba88dcc20d1fbc98ce12418b21b.tar.xz |
Brought in TestClient code for teh fork
Diffstat (limited to 'ExportBot/Commands/Movement/MoveToCommand.cs')
-rw-r--r-- | ExportBot/Commands/Movement/MoveToCommand.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ExportBot/Commands/Movement/MoveToCommand.cs b/ExportBot/Commands/Movement/MoveToCommand.cs new file mode 100644 index 0000000..6d0a225 --- /dev/null +++ b/ExportBot/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 | } | ||