Merged in patches #1828, #1833, #1835, #1836, #1832 (c/o omegaworks and happyguy)

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@856 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
otakup0pe
2007-01-19 10:05:16 +00:00
parent 0b046ed6ee
commit e5d591a950
6 changed files with 814 additions and 4 deletions

View File

@@ -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.Controls.StandUp = true;
stand(Client);
return "Standing up.";
}
void stand(SecondLife client)
{
SendAgentUpdate(client, (uint)Avatar.AgentUpdateFlags.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);
}
}
}