diff options
author | Justin Clarke Casey | 2008-04-28 14:41:46 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-04-28 14:41:46 +0000 |
commit | 776b1f341aea5005a94bc3e03159619b3e9ce502 (patch) | |
tree | 629c2fa3812039867d44d522bf2bd50980d600b5 /OpenSim/Region/Environment/Scenes/SceneManager.cs | |
parent | * Fixed 'Welcome to Krynn' default that I missed and got stuck in by a patch. (diff) | |
download | opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.zip opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.tar.gz opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.tar.bz2 opensim-SC-776b1f341aea5005a94bc3e03159619b3e9ce502.tar.xz |
From: Dr Scofield <hud@zurich.ibm.com>
Note: This is the first part of some changes from Dr Scofield to support console-less operation of an OpenSim region server.
The changes are not yet complete.
* refactors OpenSimMain into two classes: OpenSimMain and
OpenSimMainConsole. OpenSimMainConsole derives from OpenSimMain
and basically is the "old" OpenSimMain
* drops StartConsole from RegionApplicationBase (was only called
from the "old" OpenSimMain anyhow)
* reverts the changes to TryGetScene(string, out scene) as that
seems to work perfectly fine
* adds a check to region-remove to see whether
m_sceneManger.CurrentScene is non-null before comparing it against
the region-to-be-removed
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneManager.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 4ded1a7..2dfea2a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -268,26 +268,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
268 | 268 | ||
269 | public bool TryGetScene(string regionName, out Scene scene) | 269 | public bool TryGetScene(string regionName, out Scene scene) |
270 | { | 270 | { |
271 | scene = null; | ||
272 | |||
273 | foreach (Scene mscene in m_localScenes) | 271 | foreach (Scene mscene in m_localScenes) |
274 | { | 272 | { |
275 | Console.Write("Region tested: " + mscene.RegionInfo.RegionName+" With ID: "+mscene.RegionInfo.RegionID.ToString()); | 273 | if (String.Compare(mscene.RegionInfo.RegionName, regionName, true) == 0) |
276 | |||
277 | |||
278 | bool b = String.Compare(mscene.RegionInfo.RegionName.Trim(), regionName.Trim(), true) == 0; | ||
279 | |||
280 | Console.WriteLine(" <==> Result: " + b.ToString()); | ||
281 | |||
282 | if (b) | ||
283 | { | 274 | { |
284 | |||
285 | Console.WriteLine("FOUND assigning region to out parameter"); | ||
286 | scene = mscene; | 275 | scene = mscene; |
287 | return true; | 276 | return true; |
288 | } | 277 | } |
289 | } | 278 | } |
290 | 279 | scene = null; | |
291 | return false; | 280 | return false; |
292 | } | 281 | } |
293 | 282 | ||