* Added overload to RequestAllSimParcels which allows user to do a full refresh of Parcel dictionary

* Increased time delay between requests due to caps being slower responding to parcel PropertiesRequests
* See TestClient/Commands/Land/ParcelInfoCommand.cs for example usage.

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1659 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Jim Radford
2008-03-07 17:43:51 +00:00
parent b4b8c9a5d3
commit b4084c7b2e
2 changed files with 34 additions and 11 deletions

View File

@@ -769,6 +769,24 @@ namespace libsecondlife
/// <param name="simulator">Simulator to request parcels from (must be connected)</param>
public void RequestAllSimParcels(Simulator simulator)
{
RequestAllSimParcels(simulator, false);
}
/// <summary>
/// Request all simulator parcel properties (used for populating the <code>Simulator.Parcels</code>
/// dictionary)
/// </summary>
/// <param name="simulator">Simulator to request parcels from (must be connected)</param>
/// <param name="refresh">If set to true, will force a full refresh</param>
public void RequestAllSimParcels(Simulator simulator, bool refresh)
{
if (refresh)
{
lock (simulator.ParcelMap)
simulator.ParcelMap = new int[64,64];
}
Thread th = new Thread(delegate()
{
int y, x;
@@ -782,7 +800,7 @@ namespace libsecondlife
(y + 1) * 4.0f, (x + 1) * 4.0f,
y * 4.0f, x * 4.0f, 0, false);
// Pause for 50 ms after every request to avoid flooding the sim
System.Threading.Thread.Sleep(50);
System.Threading.Thread.Sleep(200);
}
}
}