From ce74418c20bdd96b8dc74f8d2567758d4659ab87 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 19 Aug 2014 00:57:49 +0100
Subject: minor:Give console feedback when we sit or stand pCampbot bots.

Also only write console lines for actually connected bots.
---
 OpenSim/Tools/pCampBot/BotManager.cs | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

(limited to 'OpenSim')

diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index b10f552..29739dc 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -690,7 +690,14 @@ namespace pCampBot
         {
             lock (m_bots)
             {
-                m_bots.ForEach(b => b.SitOnGround());
+                foreach (Bot bot in m_bots)
+                {
+                    if (bot.ConnectionState == ConnectionState.Connected)
+                    {
+                        MainConsole.Instance.OutputFormat("Sitting bot {0} on ground.", bot.Name);
+                        bot.SitOnGround();
+                    }
+                }
             }
         }
 
@@ -698,7 +705,14 @@ namespace pCampBot
         {
             lock (m_bots)
             {
-                m_bots.ForEach(b => b.Stand());
+                foreach (Bot bot in m_bots)
+                {
+                    if (bot.ConnectionState == ConnectionState.Connected)
+                    {
+                        MainConsole.Instance.OutputFormat("Standing bot {0} from ground.", bot.Name);
+                        bot.Stand();
+                    }
+                }
             }
         }
 
-- 
cgit v1.1