mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
* 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
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Console;
|
||||
@@ -276,6 +278,36 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetScene(uint locX, uint locY, out Scene scene)
|
||||
{
|
||||
foreach (Scene mscene in m_localScenes)
|
||||
{
|
||||
if (mscene.RegionInfo.RegionLocX == locX &&
|
||||
mscene.RegionInfo.RegionLocY == locY)
|
||||
{
|
||||
scene = mscene;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
scene = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetScene(IPEndPoint ipEndPoint, out Scene scene)
|
||||
{
|
||||
foreach (Scene mscene in m_localScenes)
|
||||
{
|
||||
if (mscene.RegionInfo.InternalEndPoint.Address == ipEndPoint.Address &&
|
||||
mscene.RegionInfo.InternalEndPoint.Port == ipEndPoint.Port)
|
||||
{
|
||||
scene = mscene;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
scene = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void SetDebugPacketOnCurrentScene(int newDebug)
|
||||
{
|
||||
ForEachCurrentScene(delegate(Scene scene)
|
||||
|
||||
Reference in New Issue
Block a user