add regionsize to filename

master
Christopher 2020-07-04 13:31:17 +02:00
parent ad0aa59f53
commit 318482ac3b
1 changed files with 5 additions and 5 deletions

View File

@ -288,12 +288,12 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
public Bitmap CreateMapTile()
{
if ((File.GetCreationTime(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")).Month != DateTime.Now.Month) && m_enable_refreshEveryMonth == true)
File.Delete(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp"));
if ((File.GetCreationTime(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + "." + m_scene.RegionInfo.RegionSizeX + ".bmp")).Month != DateTime.Now.Month) && m_enable_refreshEveryMonth == true)
File.Delete(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + "." + m_scene.RegionInfo.RegionSizeX + ".bmp"));
if (File.Exists(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")))
if (File.Exists(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + "." + m_scene.RegionInfo.RegionSizeX + ".bmp")))
{
return new Bitmap(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp"));
return new Bitmap(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + "." + m_scene.RegionInfo.RegionSizeX + ".bmp"));
}
else
{
@ -330,7 +330,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
if (m_enable_HostedBy)
writeHostedByOnMap(ref tile);
tile.Save(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp"));
tile.Save(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + "." + m_scene.RegionInfo.RegionSizeX + ".bmp"));
// image may be reloaded elsewhere, so no compression format
string filename = "MAP-" + m_scene.RegionInfo.RegionID.ToString() + ".png";