* Added CoordinateFrame class for camera management * Added NetworkManager.OnSimConnecting that blocks before connecting to a new sim * CurrentSim no longer goes null in between teleports * Applied jradford's patch to fix the DeedObject patch * UDP socket Bind() is used instead of Connect() now and sender verification is done in PacketReceived() to fix an apparent compatibility problem * Added Helpers.VecCross() for vector cross products * TextureEntryFace and TextureEntry now implement ICloneable git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1384 52acb1d6-8a22-11de-b505-999d5b087335
37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using System;
|
|
using libsecondlife;
|
|
|
|
namespace libsecondlife.TestClient
|
|
{
|
|
public class PrimCountCommand: Command
|
|
{
|
|
public PrimCountCommand(TestClient testClient)
|
|
{
|
|
Name = "primcount";
|
|
Description = "Shows the number of objects currently being tracked.";
|
|
}
|
|
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
|
{
|
|
int count = 0;
|
|
|
|
lock (Client.Network.Simulators)
|
|
{
|
|
for (int i = 0; i < Client.Network.Simulators.Count; i++)
|
|
{
|
|
int avcount = Client.Network.Simulators[i].Objects.AvatarCount;
|
|
int primcount = Client.Network.Simulators[i].Objects.PrimCount;
|
|
|
|
Console.WriteLine("{0} (Avatars: {1} Primitives: {2})",
|
|
Client.Network.Simulators[i].Name, avcount, primcount);
|
|
|
|
count += avcount;
|
|
count += primcount;
|
|
}
|
|
}
|
|
|
|
return "Tracking a total of " + count + " objects";
|
|
}
|
|
}
|
|
}
|