2006-11-22 00:09:31 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using libsecondlife;
|
|
|
|
|
using libsecondlife.Packets;
|
|
|
|
|
|
2006-11-24 22:27:15 +00:00
|
|
|
namespace libsecondlife.TestClient
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
|
|
|
|
public class JumpCommand: Command
|
|
|
|
|
{
|
2006-12-21 08:53:08 +00:00
|
|
|
public JumpCommand(TestClient testClient)
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
|
|
|
|
Name = "jump";
|
|
|
|
|
Description = "Teleports to the specified height. (e.g. \"jump 1000\")";
|
|
|
|
|
}
|
|
|
|
|
|
2006-12-21 08:53:08 +00:00
|
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
2006-11-28 17:58:48 +00:00
|
|
|
if (args.Length != 1)
|
2006-11-22 00:09:31 +00:00
|
|
|
return "usage: jump 1000";
|
|
|
|
|
|
|
|
|
|
float height = 0;
|
|
|
|
|
float.TryParse(args[0], out height);
|
|
|
|
|
|
|
|
|
|
Client.Self.Teleport
|
|
|
|
|
(
|
|
|
|
|
Client.Network.CurrentSim.Region.Name,
|
|
|
|
|
new LLVector3(Client.Self.Position.X, Client.Self.Position.Y, Client.Self.Position.Z + height)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
return "Jumped " + height;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|