From caa0e2a73211239fe9bade7f08bc8570168ef642 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 13 Mar 2015 23:30:31 +0000 Subject: [PATCH] Don't try to write region size and MapfileStaticFile Nini settings that are not set up when invoking the RemoteAdmin create region facility. Changes by MarcelEdward from http://opensimulator.org/mantis/view.php?id=7497. Thanks. --- OpenSim/Framework/RegionInfo.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 4169152b5e..79fbd962f9 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -823,12 +823,14 @@ namespace OpenSim.Framework string location = String.Format("{0},{1}", RegionLocX, RegionLocY); config.Set("Location", location); - if (RegionSizeX != Constants.RegionSize || RegionSizeY != Constants.RegionSize) - { + if (RegionSizeX > 0) config.Set("SizeX", RegionSizeX); + + if (RegionSizeY > 0) config.Set("SizeY", RegionSizeY); + +// if (RegionSizeZ > 0) // config.Set("SizeZ", RegionSizeZ); - } config.Set("InternalAddress", m_internalEndPoint.Address.ToString()); config.Set("InternalPort", m_internalEndPoint.Port); @@ -872,7 +874,7 @@ namespace OpenSim.Framework if (m_maptileStaticUUID != UUID.Zero) config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString()); - if (MaptileStaticFile != String.Empty) + if (MaptileStaticFile != null && MaptileStaticFile != String.Empty) config.Set("MaptileStaticFile", MaptileStaticFile); }