From 5933f9448d839b9f6db391dedc493bb5cc951d66 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 13 Aug 2013 23:54:50 +0100 Subject: Add a SendAgentUpdates setting to a new pCampbot.ini.example file which can control whether bots send agent updates pCampbot.ini.example is used by copying to pCampbot.ini, like other ini files --- OpenSim/Tools/pCampBot/Bot.cs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 9821180..c56d29b 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -64,11 +64,6 @@ namespace pCampBot public BotManager Manager { get; private set; } /// - /// Bot config, passed from BotManager. - /// - private IConfig startupConfig; - - /// /// Behaviours implemented by this bot. /// /// @@ -153,9 +148,6 @@ namespace pCampBot LoginUri = loginUri; Manager = bm; - startupConfig = bm.Config; - readconfig(); - Behaviours = behaviours; } @@ -177,14 +169,6 @@ namespace pCampBot } /// - /// Read the Nini config and initialize - /// - public void readconfig() - { - wear = startupConfig.GetString("wear", "no"); - } - - /// /// Tells LibSecondLife to logout and disconnect. Raises the disconnect events once it finishes. /// public void shutdown() @@ -207,6 +191,7 @@ namespace pCampBot Client.Settings.AVATAR_TRACKING = false; Client.Settings.OBJECT_TRACKING = false; Client.Settings.SEND_AGENT_THROTTLE = true; + Client.Settings.SEND_AGENT_UPDATES = false; Client.Settings.SEND_PINGS = true; Client.Settings.STORE_LAND_PATCHES = false; Client.Settings.USE_ASSET_CACHE = false; @@ -481,9 +466,6 @@ namespace pCampBot public void Objects_NewPrim(object sender, PrimEventArgs args) { -// if (Name.EndsWith("4")) -// throw new Exception("Aaargh"); - Primitive prim = args.Prim; if (prim != null) -- cgit v1.1 From 2146b201694a128764e66680d151b68d83610880 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 14 Aug 2013 16:51:51 +0100 Subject: Add the ability to explicitly specify a login start location to pCampbot via the -start parameter --- OpenSim/Tools/pCampBot/Bot.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index c56d29b..79344e8 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -97,6 +97,8 @@ namespace pCampBot public string Name { get; private set; } public string Password { get; private set; } public string LoginUri { get; private set; } + public string StartLocation { get; private set; } + public string saveDir; public string wear; @@ -132,7 +134,7 @@ namespace pCampBot /// public Bot( BotManager bm, List behaviours, - string firstName, string lastName, string password, string loginUri) + string firstName, string lastName, string password, string startLocation, string loginUri) { ConnectionState = ConnectionState.Disconnected; @@ -146,6 +148,7 @@ namespace pCampBot Name = string.Format("{0} {1}", FirstName, LastName); Password = password; LoginUri = loginUri; + StartLocation = startLocation; Manager = bm; Behaviours = behaviours; @@ -209,7 +212,7 @@ namespace pCampBot ConnectionState = ConnectionState.Connecting; - if (Client.Network.Login(FirstName, LastName, Password, "pCampBot", "Your name")) + if (Client.Network.Login(FirstName, LastName, Password, "pCampBot", StartLocation, "Your name")) { ConnectionState = ConnectionState.Connected; -- cgit v1.1 From 97c514daa5a3b4e4137bf01b7bee3fffc13a75d7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 14 Aug 2013 19:21:07 +0100 Subject: Shutdown a bot's actions by making it check for disconnecting state rather than aborting the thread. Aborting the thread appears to be causing shutdown issues. --- OpenSim/Tools/pCampBot/Bot.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 79344e8..dac8ccb 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -158,7 +158,7 @@ namespace pCampBot //add additional steps and/or things the bot should do private void Action() { - while (true) + while (ConnectionState != ConnectionState.Disconnecting) lock (Behaviours) Behaviours.ForEach( b => @@ -178,8 +178,8 @@ namespace pCampBot { ConnectionState = ConnectionState.Disconnecting; - if (m_actionThread != null) - m_actionThread.Abort(); +// if (m_actionThread != null) +// m_actionThread.Abort(); Client.Network.Logout(); } -- cgit v1.1