aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/mass test client/Commands/System/ShowEffectsCommand.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/mass test client/Commands/System/ShowEffectsCommand.cs76
1 files changed, 0 insertions, 76 deletions
diff --git a/tools/mass test client/Commands/System/ShowEffectsCommand.cs b/tools/mass test client/Commands/System/ShowEffectsCommand.cs
deleted file mode 100644
index 4d46e35..0000000
--- a/tools/mass test client/Commands/System/ShowEffectsCommand.cs
+++ /dev/null
@@ -1,76 +0,0 @@
1using System;
2using libsecondlife;
3
4namespace libsecondlife.TestClient
5{
6 public class ShowEffectsCommand : Command
7 {
8 bool ShowEffects = false;
9
10 public ShowEffectsCommand(TestClient testClient)
11 {
12 Name = "showeffects";
13 Description = "Prints out information for every viewer effect that is received. Usage: showeffects [on/off]";
14
15 testClient.Avatars.OnEffect += new AvatarManager.EffectCallback(Avatars_OnEffect);
16 testClient.Avatars.OnLookAt += new AvatarManager.LookAtCallback(Avatars_OnLookAt);
17 testClient.Avatars.OnPointAt += new AvatarManager.PointAtCallback(Avatars_OnPointAt);
18 }
19
20 public override string Execute(string[] args, LLUUID fromAgentID)
21 {
22 if (args.Length == 0)
23 {
24 ShowEffects = true;
25 return "Viewer effects will be shown on the console";
26 }
27 else if (args.Length == 1)
28 {
29 if (args[0] == "on")
30 {
31 ShowEffects = true;
32 return "Viewer effects will be shown on the console";
33 }
34 else
35 {
36 ShowEffects = false;
37 return "Viewer effects will not be shown";
38 }
39 }
40 else
41 {
42 return "Usage: showeffects [on/off]";
43 }
44 }
45
46 private void Avatars_OnPointAt(LLUUID sourceID, LLUUID targetID, LLVector3d targetPos,
47 MainAvatar.PointAtType pointType, float duration, LLUUID id)
48 {
49 if (ShowEffects)
50 Console.WriteLine(
51 "ViewerEffect [PointAt]: SourceID: {0} TargetID: {1} TargetPos: {2} Type: {3} Duration: {4} ID: {5}",
52 sourceID.ToStringHyphenated(), targetID.ToStringHyphenated(), targetPos, pointType, duration,
53 id.ToStringHyphenated());
54 }
55
56 private void Avatars_OnLookAt(LLUUID sourceID, LLUUID targetID, LLVector3d targetPos,
57 MainAvatar.LookAtType lookType, float duration, LLUUID id)
58 {
59 if (ShowEffects)
60 Console.WriteLine(
61 "ViewerEffect [LookAt]: SourceID: {0} TargetID: {1} TargetPos: {2} Type: {3} Duration: {4} ID: {5}",
62 sourceID.ToStringHyphenated(), targetID.ToStringHyphenated(), targetPos, lookType, duration,
63 id.ToStringHyphenated());
64 }
65
66 private void Avatars_OnEffect(MainAvatar.EffectType type, LLUUID sourceID, LLUUID targetID,
67 LLVector3d targetPos, float duration, LLUUID id)
68 {
69 if (ShowEffects)
70 Console.WriteLine(
71 "ViewerEffect [{0}]: SourceID: {1} TargetID: {2} TargetPos: {3} Duration: {4} ID: {5}",
72 type, sourceID.ToStringHyphenated(), targetID.ToStringHyphenated(), targetPos, duration,
73 id.ToStringHyphenated());
74 }
75 }
76}