diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Warp3DMap')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index fb94853..d094bee 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs | |||
@@ -245,10 +245,20 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
245 | g.Flush(); | 245 | g.Flush(); |
246 | } | 246 | } |
247 | */ | 247 | */ |
248 | public Bitmap CreateMapTileForce() | ||
249 | { | ||
250 | m_log.Info("[MAPTILE]: Forcing a map tile regenerate."); | ||
251 | File.Delete(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")); | ||
252 | return CreateMapTile(); | ||
253 | } | ||
248 | public Bitmap CreateMapTile() | 254 | public Bitmap CreateMapTile() |
249 | { | 255 | { |
250 | if ((File.GetCreationTime(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")).Month != DateTime.Now.Month) && m_enable_refreshEveryMonth == true) | 256 | if ((File.GetCreationTime(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")).Month != DateTime.Now.Month) && (m_enable_refreshEveryMonth == true)) |
257 | { | ||
258 | m_log.InfoFormat("[MAPTILE]: Clearing old map tile out of cache {0} {1}.", | ||
259 | File.GetCreationTime(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")).Month, DateTime.Now.Month); | ||
251 | File.Delete(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")); | 260 | File.Delete(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp")); |
261 | } | ||
252 | 262 | ||
253 | if(File.Exists(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp"))) | 263 | if(File.Exists(System.IO.Path.Combine(m_cacheDirectory, m_scene.RegionInfo.RegionID + ".bmp"))) |
254 | { | 264 | { |
@@ -256,6 +266,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
256 | } | 266 | } |
257 | else | 267 | else |
258 | { | 268 | { |
269 | m_log.Info("[MAPTILE]: Actually generating a map tile."); | ||
259 | /* this must be on all map, not just its image | 270 | /* this must be on all map, not just its image |
260 | if ((DateTime.Now - lastImageTime).TotalSeconds < 3600) | 271 | if ((DateTime.Now - lastImageTime).TotalSeconds < 3600) |
261 | { | 272 | { |