mirror of
https://github.com/TechplexEngineer/plexview.git
synced 2026-07-31 04:07:24 +00:00
Initial commit
I wish I could figure out how to have PlexVie be out of the LibOMV tree but its just not working die to a DLL not found exception about libopenjpeg. (Yes the dll is in the bin folder) This will do for now
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenMetaverse.TestClient
|
||||
{
|
||||
public class ShowEffectsCommand : Command
|
||||
{
|
||||
bool ShowEffects = false;
|
||||
|
||||
public ShowEffectsCommand(TestClient testClient)
|
||||
{
|
||||
Name = "showeffects";
|
||||
Description = "Prints out information for every viewer effect that is received. Usage: showeffects [on/off]";
|
||||
Category = CommandCategory.Other;
|
||||
|
||||
testClient.Avatars.ViewerEffect += new EventHandler<ViewerEffectEventArgs>(Avatars_ViewerEffect);
|
||||
testClient.Avatars.ViewerEffectPointAt += new EventHandler<ViewerEffectPointAtEventArgs>(Avatars_ViewerEffectPointAt);
|
||||
testClient.Avatars.ViewerEffectLookAt += new EventHandler<ViewerEffectLookAtEventArgs>(Avatars_ViewerEffectLookAt);
|
||||
}
|
||||
|
||||
void Avatars_ViewerEffectLookAt(object sender, ViewerEffectLookAtEventArgs e)
|
||||
{
|
||||
if (ShowEffects)
|
||||
Console.WriteLine(
|
||||
"ViewerEffect [LookAt]: SourceID: {0} TargetID: {1} TargetPos: {2} Type: {3} Duration: {4} ID: {5}",
|
||||
e.SourceID.ToString(), e.TargetID.ToString(), e.TargetPosition, e.LookType, e.Duration,
|
||||
e.EffectID.ToString());
|
||||
}
|
||||
|
||||
void Avatars_ViewerEffectPointAt(object sender, ViewerEffectPointAtEventArgs e)
|
||||
{
|
||||
if (ShowEffects)
|
||||
Console.WriteLine(
|
||||
"ViewerEffect [PointAt]: SourceID: {0} TargetID: {1} TargetPos: {2} Type: {3} Duration: {4} ID: {5}",
|
||||
e.SourceID.ToString(), e.TargetID.ToString(), e.TargetPosition, e.PointType, e.Duration,
|
||||
e.EffectID.ToString());
|
||||
}
|
||||
|
||||
void Avatars_ViewerEffect(object sender, ViewerEffectEventArgs e)
|
||||
{
|
||||
if (ShowEffects)
|
||||
Console.WriteLine(
|
||||
"ViewerEffect [{0}]: SourceID: {1} TargetID: {2} TargetPos: {3} Duration: {4} ID: {5}",
|
||||
e.Type, e.SourceID.ToString(), e.TargetID.ToString(), e.TargetPosition, e.Duration,
|
||||
e.EffectID.ToString());
|
||||
}
|
||||
|
||||
public override string Execute(string[] args, UUID fromAgentID)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
{
|
||||
ShowEffects = true;
|
||||
return "Viewer effects will be shown on the console";
|
||||
}
|
||||
else if (args.Length == 1)
|
||||
{
|
||||
if (args[0] == "on")
|
||||
{
|
||||
ShowEffects = true;
|
||||
return "Viewer effects will be shown on the console";
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowEffects = false;
|
||||
return "Viewer effects will not be shown";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Usage: showeffects [on/off]";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user