aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-11 15:00:41 +0000
committerJustin Clarke Casey2008-04-11 15:00:41 +0000
commitb3892096f3bbdb3310abd9feb341b3a040bbf081 (patch)
tree37a829ab7b6d87b8b0aa4130be0adfc0ae9dc4a3 /OpenSim/Region/Environment
parentFrom: Kurt Taylor <krtaylor@us.ibm.com> (diff)
downloadopensim-SC_OLD-b3892096f3bbdb3310abd9feb341b3a040bbf081.zip
opensim-SC_OLD-b3892096f3bbdb3310abd9feb341b3a040bbf081.tar.gz
opensim-SC_OLD-b3892096f3bbdb3310abd9feb341b3a040bbf081.tar.bz2
opensim-SC_OLD-b3892096f3bbdb3310abd9feb341b3a040bbf081.tar.xz
* From: Dr Scofield <hud@zurich.ibm.com>
* This patch adds support for saving a dynamically generated region to the filesystem (as a region xml file) * Also adds some error checknig to make sure the dynamically generated region name, id or location are not already taken. * Thanks Dr Scofield
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 62994df..fbaf655 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -27,6 +27,8 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net;
31using System.Net.Sockets;
30using libsecondlife; 32using libsecondlife;
31using OpenSim.Framework; 33using OpenSim.Framework;
32using OpenSim.Framework.Console; 34using OpenSim.Framework.Console;
@@ -276,6 +278,36 @@ namespace OpenSim.Region.Environment.Scenes
276 return false; 278 return false;
277 } 279 }
278 280
281 public bool TryGetScene(uint locX, uint locY, out Scene scene)
282 {
283 foreach (Scene mscene in m_localScenes)
284 {
285 if (mscene.RegionInfo.RegionLocX == locX &&
286 mscene.RegionInfo.RegionLocY == locY)
287 {
288 scene = mscene;
289 return true;
290 }
291 }
292 scene = null;
293 return false;
294 }
295
296 public bool TryGetScene(IPEndPoint ipEndPoint, out Scene scene)
297 {
298 foreach (Scene mscene in m_localScenes)
299 {
300 if (mscene.RegionInfo.InternalEndPoint.Address == ipEndPoint.Address &&
301 mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port)
302 {
303 scene = mscene;
304 return true;
305 }
306 }
307 scene = null;
308 return false;
309 }
310
279 public void SetDebugPacketOnCurrentScene(int newDebug) 311 public void SetDebugPacketOnCurrentScene(int newDebug)
280 { 312 {
281 ForEachCurrentScene(delegate(Scene scene) 313 ForEachCurrentScene(delegate(Scene scene)