minor:Give console feedback when we sit or stand pCampbot bots.

Also only write console lines for actually connected bots.
0.8-extended
Justin Clark-Casey (justincc) 2014-08-19 00:57:49 +01:00 committed by Justin Clark-Casey
parent c83eb4eb0a
commit 4f12d5a3f1
1 changed files with 16 additions and 2 deletions

View File

@ -666,7 +666,14 @@ namespace pCampBot
{ {
lock (m_bots) 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();
}
}
} }
} }
@ -674,7 +681,14 @@ namespace pCampBot
{ {
lock (m_bots) 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();
}
}
} }
} }