From 5b6afeafbc249ba88dcc20d1fbc98ce12418b21b Mon Sep 17 00:00:00 2001 From: gareth Date: Tue, 8 May 2007 00:10:04 +0000 Subject: Brought in TestClient code for teh fork --- ExportBot/Commands/Movement/StandCommand.cs | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ExportBot/Commands/Movement/StandCommand.cs (limited to 'ExportBot/Commands/Movement/StandCommand.cs') diff --git a/ExportBot/Commands/Movement/StandCommand.cs b/ExportBot/Commands/Movement/StandCommand.cs new file mode 100644 index 0000000..8a00552 --- /dev/null +++ b/ExportBot/Commands/Movement/StandCommand.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using libsecondlife.Packets; + +namespace libsecondlife.TestClient +{ + public class StandCommand: Command + { + public StandCommand(TestClient testClient) + { + Name = "stand"; + Description = "Stand"; + } + + public override string Execute(string[] args, LLUUID fromAgentID) + { + Client.Self.Status.StandUp = true; + stand(Client); + return "Standing up."; + } + + void stand(SecondLife client) + { + SendAgentUpdate(client, (uint)MainAvatar.ControlFlags.AGENT_CONTROL_STAND_UP); + } + + const float DRAW_DISTANCE = 96.0f; + void SendAgentUpdate(SecondLife client, uint ControlID) + { + AgentUpdatePacket p = new AgentUpdatePacket(); + p.AgentData.Far = DRAW_DISTANCE; + //LLVector3 myPos = client.Self.Position; + p.AgentData.CameraCenter = new LLVector3(0, 0, 0); + p.AgentData.CameraAtAxis = new LLVector3(0, 0, 0); + p.AgentData.CameraLeftAxis = new LLVector3(0, 0, 0); + p.AgentData.CameraUpAxis = new LLVector3(0, 0, 0); + p.AgentData.HeadRotation = new LLQuaternion(0, 0, 0, 1); ; + p.AgentData.BodyRotation = new LLQuaternion(0, 0, 0, 1); ; + p.AgentData.AgentID = client.Network.AgentID; + p.AgentData.SessionID = client.Network.SessionID; + p.AgentData.ControlFlags = ControlID; + client.Network.SendPacket(p); + } + } +} -- cgit v1.1