From 2ae5b40ca6bb3d33310f0f66569bf150548a2de6 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 24 Nov 2011 22:36:45 +0000 Subject: On pCampBot, add bot as a property on behaviours instead of passing it in every time --- OpenSim/Tools/pCampBot/Bot.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 409734e..0bd0bcc 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -130,6 +130,8 @@ namespace pCampBot BotManager bm, List behaviours, string firstName, string lastName, string password, string loginUri) { + behaviours.ForEach(b => b.Initialize(this)); + Client = new GridClient(); Random = new Random(Environment.TickCount);// We do stuff randomly here @@ -156,7 +158,7 @@ namespace pCampBot b => { // m_log.DebugFormat("[pCAMPBOT]: For {0} performing action {1}", Name, b.GetType()); - b.Action(this); + b.Action(); Thread.Sleep(Random.Next(1000, 10000)); } -- cgit v1.1