From 84023c8162b5736ba2e9d492c5a569bb71eb255b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 14 Dec 2011 16:43:49 +0000 Subject: Fix off by one bug in objects GrabbingBehaviour of pCampBot.exe Also fix usage message. --- OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs | 2 +- OpenSim/Tools/pCampBot/pCampBot.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs b/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs index 6ad02b2..701881e 100644 --- a/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs +++ b/OpenSim/Tools/pCampBot/Behaviours/GrabbingBehaviour.cs @@ -47,7 +47,7 @@ namespace pCampBot { Dictionary 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); diff --git a/OpenSim/Tools/pCampBot/pCampBot.cs b/OpenSim/Tools/pCampBot/pCampBot.cs index 3f43cff..6249fae 100644 --- a/OpenSim/Tools/pCampBot/pCampBot.cs +++ b/OpenSim/Tools/pCampBot/pCampBot.cs @@ -111,7 +111,7 @@ namespace pCampBot " -firstname first name for the bots\n" + " -lastname lastname for the bots. Each lastname will have _ appended, e.g. Ima Bot_0\n" + " -password password for the bots\n" + - " -b, behaviours behaviours for bots. Comma separated, e.g. p,g. Default is p\n", + " -b, behaviours behaviours for bots. Comma separated, e.g. p,g. Default is p\n" + " current options are:" + " p (physics)" + " g (grab)" + -- cgit v1.1