diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneManager.cs | 32 |
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 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Net; | ||
31 | using System.Net.Sockets; | ||
30 | using libsecondlife; | 32 | using libsecondlife; |
31 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
32 | using OpenSim.Framework.Console; | 34 | using 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) |