* 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:
Justin Clarke Casey
2008-04-11 15:00:41 +00:00
parent f337cb205d
commit b3892096f3
3 changed files with 155 additions and 35 deletions

View File

@@ -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)