From 297cc7ef4f44dc783ebee817f48c205b04aa68f7 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 13 Nov 2007 12:23:05 +0000 Subject: Some work on cleanly removing Regions. --- OpenSim/Region/Environment/Scenes/SceneManager.cs | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/SceneManager.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 75e2a41..da553bc 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs @@ -179,6 +179,35 @@ namespace OpenSim.Region.Environment.Scenes } } + public bool TryGetScene(string regionName, out Scene scene) + { + foreach (Scene mscene in m_localScenes) + { + if (String.Compare(mscene.RegionInfo.RegionName, regionName, true) == 0) + { + scene = mscene; + return true; + } + } + scene = null; + return false; + } + + public bool TryGetScene(LLUUID regionID, out Scene scene) + { + foreach (Scene mscene in m_localScenes) + { + if (mscene.RegionInfo.RegionID == regionID) + { + scene = mscene; + return true; + } + } + scene = null; + return false; + } + + public void SetDebugPacketOnCurrentScene(LogBase log, int newDebug) { ForEachCurrentScene(delegate(Scene scene) -- cgit v1.1