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.cs35
1 files changed, 19 insertions, 16 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 29cb1ba..6481e97 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -151,26 +151,29 @@ namespace pCampBot
151 Array.ForEach<string>( 151 Array.ForEach<string>(
152 cs.GetString("behaviours", "p").Split(new char[] { ',' }), b => behaviourSwitches.Add(b)); 152 cs.GetString("behaviours", "p").Split(new char[] { ',' }), b => behaviourSwitches.Add(b));
153 153
154 List<IBehaviour> behaviours = new List<IBehaviour>();
155
156 // Hard-coded for now
157 if (behaviourSwitches.Contains("p"))
158 behaviours.Add(new PhysicsBehaviour());
159
160 if (behaviourSwitches.Contains("g"))
161 behaviours.Add(new GrabbingBehaviour());
162
163 if (behaviourSwitches.Contains("t"))
164 behaviours.Add(new TeleportBehaviour());
165
166 MainConsole.Instance.OutputFormat(
167 "[BOT MANAGER]: Bots configured for behaviours {0}",
168 string.Join(",", behaviours.ConvertAll<string>(b => b.Name).ToArray()));
169
170 for (int i = 0; i < botcount; i++) 154 for (int i = 0; i < botcount; i++)
171 { 155 {
172 string lastName = string.Format("{0}_{1}", lastNameStem, i); 156 string lastName = string.Format("{0}_{1}", lastNameStem, i);
173 157
158 List<IBehaviour> behaviours = new List<IBehaviour>();
159
160 // Hard-coded for now
161 if (behaviourSwitches.Contains("p"))
162 behaviours.Add(new PhysicsBehaviour());
163
164 if (behaviourSwitches.Contains("g"))
165 behaviours.Add(new GrabbingBehaviour());
166
167 if (behaviourSwitches.Contains("t"))
168 behaviours.Add(new TeleportBehaviour());
169
170 if (behaviourSwitches.Contains("c"))
171 behaviours.Add(new CrossBehaviour());
172
173 MainConsole.Instance.OutputFormat(
174 "[BOT MANAGER]: Bot {0} {1} configured for behaviours {2}",
175 firstName, lastName, string.Join(",", behaviours.ConvertAll<string>(b => b.Name).ToArray()));
176
174 StartBot(this, behaviours, firstName, lastName, password, loginUri); 177 StartBot(this, behaviours, firstName, lastName, password, loginUri);
175 } 178 }
176 } 179 }