pcampbot do not add 0 to last name if only making one bot; do not try to look for tree textures

This commit is contained in:
UbitUmarov 2024-02-01 18:39:43 +00:00
parent 52bd793120
commit 47810b04d5
3 changed files with 19 additions and 6 deletions

View File

@ -650,7 +650,7 @@ namespace pCampBot
Primitive prim = args.Prim;
if (prim != null)
if (prim is not null && prim.Textures.DefaultTexture is not null)
{
lock (m_objects)
m_objects[prim.ID] = prim;

View File

@ -298,16 +298,29 @@ namespace pCampBot
Array.ForEach<string>(
startupConfig.GetString("behaviours", "p").Split(new char[] { ',' }), b => m_defaultBehaviourSwitches.Add(b));
for (int i = 0; i < botcount; i++)
if(botcount == 1)
{
lock (m_bots)
{
string lastName = string.Format("{0}{1}", m_lastNameStem, i + m_fromBotNumber);
CreateBot(
this,
CreateBehavioursFromAbbreviatedNames(m_defaultBehaviourSwitches),
m_firstName, lastName, m_password, m_loginUri, m_startUri, m_wearSetting);
m_firstName, m_lastNameStem, m_password, m_loginUri, m_startUri, m_wearSetting);
}
}
else
{
for (int i = 0; i < botcount; i++)
{
lock (m_bots)
{
string lastName = string.Format("{0}{1}", m_lastNameStem, i + m_fromBotNumber);
CreateBot(
this,
CreateBehavioursFromAbbreviatedNames(m_defaultBehaviourSwitches),
m_firstName, lastName, m_password, m_loginUri, m_startUri, m_wearSetting);
}
}
}
}

View File

@ -56,7 +56,7 @@ namespace pCampBot
[STAThread]
public static void Main(string[] args)
{
XmlConfigurator.Configure();
XmlConfigurator.Configure(new System.IO.FileInfo("pCampBot.exe.config"));
IConfig commandLineConfig = ParseConfig(args);
if (commandLineConfig.Get("help") != null || commandLineConfig.Get("loginuri") == null)