diff options
author | John Hurliman | 2010-06-11 15:43:22 -0700 |
---|---|---|
committer | John Hurliman | 2010-06-11 15:43:22 -0700 |
commit | b5bc2816fc43d1b5d2c54c90c8135eab7b0a72be (patch) | |
tree | 95db3efbd631a46c2006fc94dd5ed869ccfcc61a /OpenSim/Region/CoreModules/World | |
parent | * Added a new method to IMapImageGenerator for getting the map tile before it... (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-b5bc2816fc43d1b5d2c54c90c8135eab7b0a72be.zip opensim-SC-b5bc2816fc43d1b5d2c54c90c8135eab7b0a72be.tar.gz opensim-SC-b5bc2816fc43d1b5d2c54c90c8135eab7b0a72be.tar.bz2 opensim-SC-b5bc2816fc43d1b5d2c54c90c8135eab7b0a72be.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index c6fb18d..0e849e5 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -1002,41 +1002,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1002 | 1002 | ||
1003 | public void RegenerateMaptile(byte[] data) | 1003 | public void RegenerateMaptile(byte[] data) |
1004 | { | 1004 | { |
1005 | // Overwrites the local Asset cache with new maptile data | ||
1006 | // Assets are single write, this causes the asset server to ignore this update, | ||
1007 | // but the local asset cache does not | ||
1008 | |||
1009 | // this is on purpose! The net result of this is the region always has the most up to date | ||
1010 | // map tile while protecting the (grid) asset database from bloat caused by a new asset each | ||
1011 | // time a mapimage is generated! | ||
1012 | |||
1013 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; | 1005 | UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; |
1014 | 1006 | ||
1015 | int lastMapRefresh = 0; | ||
1016 | int twoDays = 172800; | ||
1017 | // int RefreshSeconds = twoDays; | ||
1018 | |||
1019 | try | ||
1020 | { | ||
1021 | lastMapRefresh = Convert.ToInt32(m_scene.RegionInfo.lastMapRefresh); | ||
1022 | } | ||
1023 | catch (ArgumentException) | ||
1024 | { | ||
1025 | } | ||
1026 | catch (FormatException) | ||
1027 | { | ||
1028 | } | ||
1029 | catch (OverflowException) | ||
1030 | { | ||
1031 | } | ||
1032 | |||
1033 | m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE"); | 1007 | m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE"); |
1034 | 1008 | ||
1035 | m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); | 1009 | m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); |
1036 | 1010 | ||
1037 | AssetBase asset = new AssetBase( | 1011 | AssetBase asset = new AssetBase( |
1038 | m_scene.RegionInfo.RegionSettings.TerrainImageID, | 1012 | m_scene.RegionInfo.RegionSettings.TerrainImageID, |
1039 | "terrainImage_" + m_scene.RegionInfo.RegionID.ToString() + "_" + lastMapRefresh.ToString(), | 1013 | "terrainImage_" + m_scene.RegionInfo.RegionID.ToString(), |
1040 | (sbyte)AssetType.Texture, | 1014 | (sbyte)AssetType.Texture, |
1041 | m_scene.RegionInfo.RegionID.ToString()); | 1015 | m_scene.RegionInfo.RegionID.ToString()); |
1042 | asset.Data = data; | 1016 | asset.Data = data; |