* Moved MainAvatar delegates and enums in to the MainAvatar.cs file * TestClient now stores prims in per-sim dictionaries * TestClient throttles the connection at login * OnTeleport callback passes a reference to the current Simulator * Removed unneeded typecasts to Packet * AutoPilotLocal() doesn't need the GridRegionData reference * Disconnects and packets resent multiple times are handled better * OnNewAvatar is fired for our own avatar as well, and our avatar position is updated all the time now, as well as confirming it's our avatar by UUID instead of name git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@721 52acb1d6-8a22-11de-b505-999d5b087335
33 lines
769 B
C#
33 lines
769 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()
|
|
{
|
|
Name = "primCount";
|
|
Description = "Shows the number of prims that have been received.";
|
|
}
|
|
|
|
public override string Execute(SecondLife Client, string[] args, LLUUID fromAgentID)
|
|
{
|
|
int count = 0;
|
|
|
|
lock (TestClient.SimPrims)
|
|
{
|
|
foreach (Dictionary<uint, PrimObject> prims in TestClient.SimPrims.Values)
|
|
{
|
|
count += prims.Count;
|
|
}
|
|
}
|
|
|
|
return count.ToString();
|
|
}
|
|
}
|
|
}
|