Files
Blake Bourque 0bb2dff347 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
2015-06-18 22:15:24 -04:00

29 lines
927 B
C#

using System;
using OpenMetaverse;
namespace OpenMetaverse.TestClient
{
public class WindCommand : Command
{
public WindCommand(TestClient testClient)
{
Name = "wind";
Description = "Displays current wind data";
Category = CommandCategory.Simulator;
}
public override string Execute(string[] args, UUID fromAgentID)
{
// Get the agent's current "patch" position, where each patch of
// wind data is a 16x16m square
Vector3 agentPos = Client.Self.SimPosition;
int xPos = (int)Utils.Clamp(agentPos.X, 0.0f, 255.0f) / 16;
int yPos = (int)Utils.Clamp(agentPos.Y, 0.0f, 255.0f) / 16;
Vector2 windSpeed = Client.Network.CurrentSim.WindSpeeds[yPos * 16 + xPos];
return "Local wind speed is " + windSpeed.ToString();
}
}
}