Files
libremetaverse/libsecondlife/examples/TestClient/Commands/PrimCountCommand.cs
John Hurliman 6e7af40682 * Fixed a crash when attempting to teleport with CAPS disabled
* The meaning of Settings.ALWAYS_DECODE_OBJECTS has changed slightly, agent updates are now always decoded regardless of this setting. Clients that are not doing object tracking and have this set to false should see less memory usage
* NameValue is now a struct
* LLObject.NameValues is now an array to help with performance and serialization

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1135 52acb1d6-8a22-11de-b505-999d5b087335
2007-04-20 16:03:24 +00:00

33 lines
768 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
namespace libsecondlife.TestClient
{
public class PrimCountCommand: Command
{
public PrimCountCommand(TestClient testClient)
{
Name = "primcount";
Description = "Shows the number of prims that have been received.";
}
public override string Execute(string[] args, LLUUID fromAgentID)
{
int count = 0;
lock (Client.SimPrims)
{
foreach (Dictionary<uint, Primitive> prims in Client.SimPrims.Values)
{
count += prims.Count;
}
}
return count.ToString();
}
}
}