* Renamed AssetType.Object to AssetType.Primitive and AssetObject to AssetPrim to clear up confusion
* Big cleanup of group functions, moving things from MainAvatar to GroupManager, renaming BeginGet* to Request*, and adding new functions and callbacks * Added an Autopilot function that takes doubles as input (very accurate autopilot) * Added Settings.CONTINUOUS_AGENT_UPDATES which defaults to true * Added quotes to the post-build event in VS2005 * Added empty AssetSound and AssetClothing, feel free to fill them in :-) * Client.Self.*Name are read only properties now git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1357 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -2,23 +2,33 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace libsecondlife.TestClient.Commands.Movement {
|
||||
class MovetoCommand : Command {
|
||||
public MovetoCommand(TestClient client) {
|
||||
namespace libsecondlife.TestClient.Commands.Movement
|
||||
{
|
||||
class MovetoCommand : Command
|
||||
{
|
||||
public MovetoCommand(TestClient client)
|
||||
{
|
||||
Name = "moveto";
|
||||
Description = "Moves the avatar to the specified global position using simulator autopilot.";
|
||||
}
|
||||
public override string Execute(string[] args, LLUUID fromAgentID) {
|
||||
|
||||
public override string Execute(string[] args, LLUUID fromAgentID)
|
||||
{
|
||||
if (args.Length != 3)
|
||||
return "usage: moveto x y z";
|
||||
float x = Client.Self.Position.X + Client.regionX;
|
||||
float y = Client.Self.Position.Y + Client.regionY;
|
||||
|
||||
uint regionX, regionY;
|
||||
Helpers.LongToUInts(Client.Network.CurrentSim.Handle, out regionX, out regionY);
|
||||
|
||||
float x = Client.Self.Position.X + (ulong)regionX;
|
||||
float y = Client.Self.Position.Y + (ulong)regionY;
|
||||
float z = Client.Self.Position.Z;
|
||||
float.TryParse(args[0], out x);
|
||||
float.TryParse(args[1], out y);
|
||||
float.TryParse(args[2], out z);
|
||||
Client.Self.AutoPilot((ulong)x, (ulong)y, z);
|
||||
return "Attempting to move to <" + x + ", " + y + ", " + z + ">";
|
||||
|
||||
return String.Format("Attempting to move to <{0},{1},{2}>", x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user