From e3f51df3c27c5bc74bc69789d18015c538220935 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 31 Oct 2011 21:33:25 +0000 Subject: Stop pCampbot from firing connected event twice, which results in double counting. --- OpenSim/Tools/pCampBot/BotManager.cs | 16 ++++++++-------- OpenSim/Tools/pCampBot/PhysicsBot.cs | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'OpenSim/Tools/pCampBot') diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 614b350..c9d1446 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -81,16 +81,16 @@ namespace pCampBot m_console.Commands.AddCommand("bot", false, "shutdown", "shutdown", - "Gracefully shut down bots", HandleShutdown); + "Shutdown bots and exit", HandleShutdown); m_console.Commands.AddCommand("bot", false, "quit", "quit", - "Force quit (DANGEROUS, try shutdown first)", + "Shutdown bots and exit", HandleShutdown); - m_console.Commands.AddCommand("bot", false, "add bots", - "add bots ", - "Add more bots", HandleAddBots); +// m_console.Commands.AddCommand("bot", false, "add bots", +// "add bots ", +// "Add more bots", HandleAddBots); m_lBot = new List(); } @@ -177,14 +177,14 @@ namespace pCampBot switch (eventt) { case EventType.CONNECTED: - m_log.Info("[ " + callbot.firstname + " " + callbot.lastname + "]: Connected"); + m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Connected"); numbots++; break; case EventType.DISCONNECTED: - m_log.Info("[ " + callbot.firstname + " " + callbot.lastname + "]: Disconnected"); + m_log.Info("[" + callbot.firstname + " " + callbot.lastname + "]: Disconnected"); m_td[m_lBot.IndexOf(callbot)].Abort(); numbots--; - if (numbots >1) + if (numbots <= 0) Environment.Exit(0); break; } diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 5d4af31..de54836 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -165,7 +165,7 @@ namespace pCampBot m_action.AutoReset = false; m_action.Elapsed += new ElapsedEventHandler(m_action_Elapsed); m_action.Start(); - OnConnected(this, EventType.CONNECTED); +// OnConnected(this, EventType.CONNECTED); if (wear == "save") { client.Appearance.SetPreviousAppearance(); @@ -384,6 +384,7 @@ namespace pCampBot { client.Assets.RequestImage(prim.Textures.DefaultTexture.TextureID, ImageType.Normal, Asset_TextureCallback_Texture); } + for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) { if (prim.Textures.FaceTextures[i] != null) @@ -392,10 +393,10 @@ namespace pCampBot { client.Assets.RequestImage(prim.Textures.FaceTextures[i].TextureID, ImageType.Normal, Asset_TextureCallback_Texture); } - } } } + if (prim.Sculpt.SculptTexture != UUID.Zero) { client.Assets.RequestImage(prim.Sculpt.SculptTexture, ImageType.Normal, Asset_TextureCallback_Texture); -- cgit v1.1