refactor: Actually use MaptileStaticFile in RegionInfo rather than having both a public field and a get property
parent
7a4c5b067d
commit
b0bae62c30
|
@ -143,7 +143,6 @@ namespace OpenSim.Framework
|
||||||
public string RemotingAddress;
|
public string RemotingAddress;
|
||||||
public UUID ScopeID = UUID.Zero;
|
public UUID ScopeID = UUID.Zero;
|
||||||
private UUID m_maptileStaticUUID = UUID.Zero;
|
private UUID m_maptileStaticUUID = UUID.Zero;
|
||||||
public string m_maptileStaticFile;
|
|
||||||
|
|
||||||
public uint WorldLocX = 0;
|
public uint WorldLocX = 0;
|
||||||
public uint WorldLocY = 0;
|
public uint WorldLocY = 0;
|
||||||
|
@ -351,10 +350,7 @@ namespace OpenSim.Framework
|
||||||
get { return m_maptileStaticUUID; }
|
get { return m_maptileStaticUUID; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string MaptileStaticFile
|
public string MaptileStaticFile { get; private set; }
|
||||||
{
|
|
||||||
get { return m_maptileStaticFile; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The port by which http communication occurs with the region (most noticeably, CAPS communication)
|
/// The port by which http communication occurs with the region (most noticeably, CAPS communication)
|
||||||
|
@ -723,7 +719,7 @@ namespace OpenSim.Framework
|
||||||
config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
|
config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_maptileStaticFile = config.GetString("MaptileStaticFile", String.Empty);
|
MaptileStaticFile = config.GetString("MaptileStaticFile", String.Empty);
|
||||||
allKeys.Remove("MaptileStaticFile");
|
allKeys.Remove("MaptileStaticFile");
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -853,8 +849,8 @@ namespace OpenSim.Framework
|
||||||
if (m_maptileStaticUUID != UUID.Zero)
|
if (m_maptileStaticUUID != UUID.Zero)
|
||||||
config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
|
config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
|
||||||
|
|
||||||
if (m_maptileStaticFile != String.Empty)
|
if (MaptileStaticFile != String.Empty)
|
||||||
config.Set("MaptileStaticFile", m_maptileStaticFile);
|
config.Set("MaptileStaticFile", MaptileStaticFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ignoreIncomingConfiguration(string configuration_key, object configuration_result)
|
public bool ignoreIncomingConfiguration(string configuration_key, object configuration_result)
|
||||||
|
@ -966,7 +962,7 @@ namespace OpenSim.Framework
|
||||||
"UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true);
|
"UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true);
|
||||||
|
|
||||||
configMember.addConfigurationOption("region_static_mapfile", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
configMember.addConfigurationOption("region_static_mapfile", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
"Filename of a texture to use as the map for this region", m_maptileStaticFile, true);
|
"Filename of a texture to use as the map for this region", MaptileStaticFile, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadConfigurationOptions()
|
public void loadConfigurationOptions()
|
||||||
|
@ -1116,7 +1112,7 @@ namespace OpenSim.Framework
|
||||||
m_maptileStaticUUID = (UUID)configuration_result;
|
m_maptileStaticUUID = (UUID)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "region_static_mapfile":
|
case "region_static_mapfile":
|
||||||
m_maptileStaticFile = (string)configuration_result;
|
MaptileStaticFile = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
|
||||||
|
|
||||||
if (generateMaptiles)
|
if (generateMaptiles)
|
||||||
{
|
{
|
||||||
if (String.IsNullOrEmpty(m_scene.RegionInfo.m_maptileStaticFile))
|
if (String.IsNullOrEmpty(m_scene.RegionInfo.MaptileStaticFile))
|
||||||
{
|
{
|
||||||
if (textureTerrain)
|
if (textureTerrain)
|
||||||
{
|
{
|
||||||
|
@ -122,15 +122,21 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
mapbmp = new Bitmap(m_scene.RegionInfo.m_maptileStaticFile);
|
mapbmp = new Bitmap(m_scene.RegionInfo.MaptileStaticFile);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[MAPTILE]: Failed to load Static map image texture file: {0} for {1}", m_scene.RegionInfo.m_maptileStaticFile, m_scene.Name);
|
m_log.ErrorFormat(
|
||||||
|
"[MAPTILE]: Failed to load Static map image texture file: {0} for {1}",
|
||||||
|
m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
|
||||||
//mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
|
//mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
|
||||||
mapbmp = null;
|
mapbmp = null;
|
||||||
}
|
}
|
||||||
if (mapbmp != null) m_log.DebugFormat("[MAPTILE]: Static map image texture file {0} found for {1}", m_scene.RegionInfo.m_maptileStaticFile, m_scene.Name);
|
|
||||||
|
if (mapbmp != null)
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[MAPTILE]: Static map image texture file {0} found for {1}",
|
||||||
|
m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue