diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index d615b3f..74bd36a 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -177,18 +177,21 @@ namespace pCampBot | |||
177 | // We must give each bot its own list of instantiated behaviours since they store state. | 177 | // We must give each bot its own list of instantiated behaviours since they store state. |
178 | List<IBehaviour> behaviours = new List<IBehaviour>(); | 178 | List<IBehaviour> behaviours = new List<IBehaviour>(); |
179 | 179 | ||
180 | // Hard-coded for now | 180 | // Hard-coded for now |
181 | if (behaviourSwitches.Contains("p")) | 181 | if (behaviourSwitches.Contains("c")) |
182 | behaviours.Add(new PhysicsBehaviour()); | 182 | behaviours.Add(new CrossBehaviour()); |
183 | 183 | ||
184 | if (behaviourSwitches.Contains("g")) | 184 | if (behaviourSwitches.Contains("g")) |
185 | behaviours.Add(new GrabbingBehaviour()); | 185 | behaviours.Add(new GrabbingBehaviour()); |
186 | |||
187 | if (behaviourSwitches.Contains("n")) | ||
188 | behaviours.Add(new NoneBehaviour()); | ||
189 | |||
190 | if (behaviourSwitches.Contains("p")) | ||
191 | behaviours.Add(new PhysicsBehaviour()); | ||
186 | 192 | ||
187 | if (behaviourSwitches.Contains("t")) | 193 | if (behaviourSwitches.Contains("t")) |
188 | behaviours.Add(new TeleportBehaviour()); | 194 | behaviours.Add(new TeleportBehaviour()); |
189 | |||
190 | if (behaviourSwitches.Contains("c")) | ||
191 | behaviours.Add(new CrossBehaviour()); | ||
192 | 195 | ||
193 | StartBot(this, behaviours, firstName, lastName, password, loginUri); | 196 | StartBot(this, behaviours, firstName, lastName, password, loginUri); |
194 | } | 197 | } |
@@ -327,17 +330,30 @@ namespace pCampBot | |||
327 | string outputFormat = "{0,-30} {1, -30} {2,-14}"; | 330 | string outputFormat = "{0,-30} {1, -30} {2,-14}"; |
328 | MainConsole.Instance.OutputFormat(outputFormat, "Name", "Region", "Status"); | 331 | MainConsole.Instance.OutputFormat(outputFormat, "Name", "Region", "Status"); |
329 | 332 | ||
333 | Dictionary<ConnectionState, int> totals = new Dictionary<ConnectionState, int>(); | ||
334 | foreach (object o in Enum.GetValues(typeof(ConnectionState))) | ||
335 | totals[(ConnectionState)o] = 0; | ||
336 | |||
330 | lock (m_lBot) | 337 | lock (m_lBot) |
331 | { | 338 | { |
332 | foreach (Bot pb in m_lBot) | 339 | foreach (Bot pb in m_lBot) |
333 | { | 340 | { |
334 | Simulator currentSim = pb.Client.Network.CurrentSim; | 341 | Simulator currentSim = pb.Client.Network.CurrentSim; |
342 | totals[pb.ConnectionState]++; | ||
335 | 343 | ||
336 | MainConsole.Instance.OutputFormat( | 344 | MainConsole.Instance.OutputFormat( |
337 | outputFormat, | 345 | outputFormat, |
338 | pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState); | 346 | pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.ConnectionState); |
339 | } | 347 | } |
340 | } | 348 | } |
349 | |||
350 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | ||
351 | |||
352 | foreach (KeyValuePair<ConnectionState, int> kvp in totals) | ||
353 | cdl.AddRow(kvp.Key, kvp.Value); | ||
354 | |||
355 | |||
356 | MainConsole.Instance.OutputFormat("\n{0}", cdl.ToString()); | ||
341 | } | 357 | } |
342 | 358 | ||
343 | /* | 359 | /* |