aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot/BotManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Tools/pCampBot/BotManager.cs')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index b05bd6d..0505c97 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -37,6 +37,7 @@ using log4net.Repository;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Console; 39using OpenSim.Framework.Console;
40using pCampBot.Interfaces;
40 41
41namespace pCampBot 42namespace pCampBot
42{ 43{
@@ -119,10 +120,14 @@ namespace pCampBot
119 string password = cs.GetString("password"); 120 string password = cs.GetString("password");
120 string loginUri = cs.GetString("loginuri"); 121 string loginUri = cs.GetString("loginuri");
121 122
123 // Hardcoded for new
124 List<IBehaviour> behaviours = new List<IBehaviour>();
125 behaviours.Add(new PhysicsBehaviour());
126
122 for (int i = 0; i < botcount; i++) 127 for (int i = 0; i < botcount; i++)
123 { 128 {
124 string lastName = string.Format("{0}_{1}", lastNameStem, i); 129 string lastName = string.Format("{0}_{1}", lastNameStem, i);
125 startupBot(i, this, firstName, lastName, password, loginUri); 130 startupBot(i, this, behaviours, firstName, lastName, password, loginUri);
126 } 131 }
127 } 132 }
128 133
@@ -150,14 +155,17 @@ namespace pCampBot
150 /// This starts up the bot and stores the thread for the bot in the thread array 155 /// This starts up the bot and stores the thread for the bot in the thread array
151 /// </summary> 156 /// </summary>
152 /// <param name="pos">The position in the thread array to stick the bot's thread</param> 157 /// <param name="pos">The position in the thread array to stick the bot's thread</param>
153 /// <param name="cs">Configuration of the bot</param> 158 /// <param name="bm"></param>
159 /// <param name="behaviours">Behaviours for this bot to perform.</param>
154 /// <param name="firstName">First name</param> 160 /// <param name="firstName">First name</param>
155 /// <param name="lastName">Last name</param> 161 /// <param name="lastName">Last name</param>
156 /// <param name="password">Password</param> 162 /// <param name="password">Password</param>
157 /// <param name="loginUri">Login URI</param> 163 /// <param name="loginUri">Login URI</param>
158 public void startupBot(int pos, BotManager bm, string firstName, string lastName, string password, string loginUri) 164 public void startupBot(
165 int pos, BotManager bm, List<IBehaviour> behaviours,
166 string firstName, string lastName, string password, string loginUri)
159 { 167 {
160 PhysicsBot pb = new PhysicsBot(bm, firstName, lastName, password, loginUri); 168 PhysicsBot pb = new PhysicsBot(bm, behaviours, firstName, lastName, password, loginUri);
161 169
162 pb.OnConnected += handlebotEvent; 170 pb.OnConnected += handlebotEvent;
163 pb.OnDisconnected += handlebotEvent; 171 pb.OnDisconnected += handlebotEvent;