From f31a58bd999db3d333da42c4fb15e35e989d9717 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 10 Nov 2011 19:40:45 +0000 Subject: [PATCH 1/4] Remove unused index parameter from BotManager.startupBot(). Rename startupBot() => StartBot() --- OpenSim/Tools/pCampBot/BotManager.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index c4c6f8f9d9..c77e144abc 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -136,7 +136,7 @@ namespace pCampBot if (behaviourSwitches.Contains("g")) behaviours.Add(new GrabbingBehaviour()); - startupBot(i, this, behaviours, firstName, lastName, password, loginUri); + StartBot(this, behaviours, firstName, lastName, password, loginUri); } } @@ -156,22 +156,21 @@ namespace pCampBot // int newlen = len + botcount; // for (int i = len; i < newlen; i++) // { -// startupBot(i, Config); +// startupBot(Config); // } // } /// /// This starts up the bot and stores the thread for the bot in the thread array /// - /// The position in the thread array to stick the bot's thread /// /// Behaviours for this bot to perform. /// First name /// Last name /// Password /// Login URI - public void startupBot( - int pos, BotManager bm, List behaviours, + public void StartBot( + BotManager bm, List behaviours, string firstName, string lastName, string password, string loginUri) { Bot pb = new Bot(bm, behaviours, firstName, lastName, password, loginUri); From 9cba179dff66f7def8f68334893c6db9a65a613e Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 10 Nov 2011 20:03:36 +0000 Subject: [PATCH 2/4] launch pCampbot shutdown console comand asynchronously --- OpenSim/Tools/pCampBot/BotManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index c77e144abc..f5dd5e0847 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -233,8 +233,11 @@ namespace pCampBot private void HandleShutdown(string module, string[] cmd) { - m_log.Warn("[BOTMANAGER]: Shutting down bots"); - doBotShutdown(); + Util.FireAndForget(o => + { + m_log.Warn("[BOTMANAGER]: Shutting down bots"); + doBotShutdown(); + }); } private void HandleShowStatus(string module, string[] cmd) From 48d2300b8a762f6fba1e6741c69e975b358bbc36 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 10 Nov 2011 20:26:14 +0100 Subject: [PATCH 3/4] Fix misaligned sit animation on scripted sit caused by the default sit animation being run after the scripted one. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 99be46d638..fc5141f8eb 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2013,8 +2013,6 @@ namespace OpenSim.Region.Framework.Scenes sitOrientation = avSitOrientation; autopilot = false; } - part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); - pos = part.AbsolutePosition + offset; //if (Math.Abs(part.AbsolutePosition.Z - AbsolutePosition.Z) > 1) //{ @@ -2060,6 +2058,12 @@ namespace OpenSim.Region.Framework.Scenes m_sitAtAutoTarget = autopilot; if (!autopilot) HandleAgentSit(remoteClient, UUID); + + // Moved here to avoid a race with default sit anim + // The script event needs to be raised after the default sit anim is set. + if (part != null) + part.ParentGroup.TriggerScriptChangedEvent(Changed.LINK); + } // public void HandleAgentRequestSit(IClientAPI remoteClient, UUID agentID, UUID targetID, Vector3 offset, string sitAnimation) From b990914ec4f945f986e9f1386260b32fae8a42ed Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 10 Nov 2011 21:04:12 +0000 Subject: [PATCH 4/4] convert tabs from commit 3758306 to spaces --- OpenSim/Region/Application/OpenSim.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 52b19eaafa..9fe284f4ca 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -56,7 +56,7 @@ namespace OpenSim protected bool m_gui = false; protected string m_consoleType = "local"; protected uint m_consolePort = 0; - protected string m_custom_prompt; + protected string m_custom_prompt; private string m_timedScript = "disabled"; private Timer m_scriptTimer; @@ -86,7 +86,9 @@ namespace OpenSim if (networkConfig != null) m_consolePort = (uint)networkConfig.GetInt("console_port", 0); + m_timedScript = startupConfig.GetString("timer_Script", "disabled"); + if (m_logFileAppender != null) { if (m_logFileAppender is log4net.Appender.FileAppender) @@ -109,7 +111,7 @@ namespace OpenSim Util.FireAndForgetMethod = asyncCallMethod; stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); - m_custom_prompt = startupConfig.GetString("custom_prompt", "Region"); + m_custom_prompt = startupConfig.GetString("custom_prompt", "Region"); } if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) @@ -830,9 +832,10 @@ namespace OpenSim { MainConsole.Instance.Output("Usage: change region "); } + string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName); MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); - m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName); + m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName); m_console.ConsoleScene = m_sceneManager.CurrentScene; }