From 64a98c736848de6099254f23483058668273c1a5 Mon Sep 17 00:00:00 2001 From: gareth Date: Mon, 14 May 2007 03:13:47 +0000 Subject: Finished off adding the new management API to gridserver Updated VersionInfo.cs finally Updated prebuild and rebuilt nant build files Completed Management agent basics --- ExportBot/Commands/Movement/SitCommand.cs | 52 ------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 ExportBot/Commands/Movement/SitCommand.cs (limited to 'ExportBot/Commands/Movement/SitCommand.cs') diff --git a/ExportBot/Commands/Movement/SitCommand.cs b/ExportBot/Commands/Movement/SitCommand.cs deleted file mode 100644 index b9ef6be..0000000 --- a/ExportBot/Commands/Movement/SitCommand.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using libsecondlife; -using libsecondlife.Packets; - -namespace libsecondlife.TestClient -{ - public class SitCommand: Command - { - public SitCommand(TestClient testClient) - { - Name = "sit"; - Description = "Attempt to sit on the closest prim"; - } - - public override string Execute(string[] args, LLUUID fromAgentID) - { - Primitive closest = null; - double closestDistance = Double.MaxValue; - - lock (Client.SimPrims) - { - if (Client.SimPrims.ContainsKey(Client.Network.CurrentSim)) - { - foreach (Primitive p in Client.SimPrims[Client.Network.CurrentSim].Values) - { - float distance = Helpers.VecDist(Client.Self.Position, p.Position); - - if (closest == null || distance < closestDistance) - { - closest = p; - closestDistance = distance; - } - } - } - } - - if (closest != null) - { - Client.Self.RequestSit(closest.ID, LLVector3.Zero); - Client.Self.Sit(); - - return "Sat on " + closest.ID + ". Distance: " + closestDistance; - } - else - { - return "Couldn't find a nearby prim to sit on"; - } - } - } -} -- cgit v1.1