Fix off by one bug in objects GrabbingBehaviour of pCampBot.exe

Also fix usage message.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-12-14 16:43:49 +00:00
parent b242ceda1e
commit 84023c8162
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ namespace pCampBot
{
Dictionary<UUID, Primitive> objects = Bot.Objects;
Primitive prim = objects.ElementAt(Bot.Random.Next(0, objects.Count)).Value;
Primitive prim = objects.ElementAt(Bot.Random.Next(0, objects.Count - 1)).Value;
// This appears to be a typical message sent when a viewer user clicks a clickable object
Bot.Client.Self.Grab(prim.LocalID);