diff options
author | Adam Frisby | 2007-06-21 17:08:21 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-21 17:08:21 +0000 |
commit | e93869c7a785a4f375685ffa33c913033ed1c85a (patch) | |
tree | abb5e2c58f8750a1bc05acf58716b6b025da4d15 /tools/mass test client/Commands/Movement/StandCommand.cs | |
parent | Fixed the struct and null compare bug. (diff) | |
download | opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.zip opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.tar.gz opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.tar.bz2 opensim-SC-e93869c7a785a4f375685ffa33c913033ed1c85a.tar.xz |
* Importing Ming's mass test client
Diffstat (limited to 'tools/mass test client/Commands/Movement/StandCommand.cs')
-rw-r--r-- | tools/mass test client/Commands/Movement/StandCommand.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tools/mass test client/Commands/Movement/StandCommand.cs b/tools/mass test client/Commands/Movement/StandCommand.cs new file mode 100644 index 0000000..bb8542b --- /dev/null +++ b/tools/mass test client/Commands/Movement/StandCommand.cs | |||
@@ -0,0 +1,47 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | using libsecondlife.Packets; | ||
6 | |||
7 | namespace libsecondlife.TestClient | ||
8 | { | ||
9 | public class StandCommand: Command | ||
10 | { | ||
11 | public StandCommand(TestClient testClient) | ||
12 | { | ||
13 | Name = "stand"; | ||
14 | Description = "Stand"; | ||
15 | } | ||
16 | |||
17 | public override string Execute(string[] args, LLUUID fromAgentID) | ||
18 | { | ||
19 | Client.Self.Status.StandUp = true; | ||
20 | stand(Client); | ||
21 | return "Standing up."; | ||
22 | } | ||
23 | |||
24 | void stand(SecondLife client) | ||
25 | { | ||
26 | SendAgentUpdate(client, (uint)MainAvatar.ControlFlags.AGENT_CONTROL_STAND_UP); | ||
27 | } | ||
28 | |||
29 | const float DRAW_DISTANCE = 96.0f; | ||
30 | void SendAgentUpdate(SecondLife client, uint ControlID) | ||
31 | { | ||
32 | AgentUpdatePacket p = new AgentUpdatePacket(); | ||
33 | p.AgentData.Far = DRAW_DISTANCE; | ||
34 | //LLVector3 myPos = client.Self.Position; | ||
35 | p.AgentData.CameraCenter = new LLVector3(0, 0, 0); | ||
36 | p.AgentData.CameraAtAxis = new LLVector3(0, 0, 0); | ||
37 | p.AgentData.CameraLeftAxis = new LLVector3(0, 0, 0); | ||
38 | p.AgentData.CameraUpAxis = new LLVector3(0, 0, 0); | ||
39 | p.AgentData.HeadRotation = new LLQuaternion(0, 0, 0, 1); ; | ||
40 | p.AgentData.BodyRotation = new LLQuaternion(0, 0, 0, 1); ; | ||
41 | p.AgentData.AgentID = client.Network.AgentID; | ||
42 | p.AgentData.SessionID = client.Network.SessionID; | ||
43 | p.AgentData.ControlFlags = ControlID; | ||
44 | client.Network.SendPacket(p); | ||
45 | } | ||
46 | } | ||
47 | } | ||