From 7f019cc196c046acd00aa8b58460f9aedcb650bb Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Sat, 17 Dec 2011 00:27:19 +0000 Subject: [PATCH] If a startup simulator script is present, run it after the normal region selection code rather than before. This allows the script to change the selected region without having it immediately undone. Thanks to Garmin Kawaguichi for this patch. --- OpenSim/Region/Application/OpenSim.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 8d98cc9b93..ea098936b2 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -188,6 +188,18 @@ namespace OpenSim } } + // Hook up to the watchdog timer + Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; + + PrintFileToConsole("startuplogo.txt"); + + // For now, start at the 'root' level by default + if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it + ChangeSelectedRegion("region", + new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName}); + else + ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); + //Run Startup Commands if (String.IsNullOrEmpty(m_startupCommandsFile)) { @@ -206,18 +218,6 @@ namespace OpenSim m_scriptTimer.Interval = 1200*1000; m_scriptTimer.Elapsed += RunAutoTimerScript; } - - // Hook up to the watchdog timer - Watchdog.OnWatchdogTimeout += WatchdogTimeoutHandler; - - PrintFileToConsole("startuplogo.txt"); - - // For now, start at the 'root' level by default - if (m_sceneManager.Scenes.Count == 1) // If there is only one region, select it - ChangeSelectedRegion("region", - new string[] {"change", "region", m_sceneManager.Scenes[0].RegionInfo.RegionName}); - else - ChangeSelectedRegion("region", new string[] {"change", "region", "root"}); } ///