aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
diff options
context:
space:
mode:
authorRobert Adams2013-09-25 17:21:20 -0700
committerRobert Adams2013-09-28 07:33:56 -0700
commit8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1 (patch)
tree0423a4cd16f354f21d12162eaa351d9e13ba52fd /OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
parentRemove time based terrain storage in SQLite so revision number can be used (diff)
downloadopensim-SC_OLD-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.zip
opensim-SC_OLD-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.tar.gz
opensim-SC_OLD-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.tar.bz2
opensim-SC_OLD-8c1d80fdfd104b94cb7a4fd247b3baa2a9988ea1.tar.xz
varregion: serious rework of TerrainChannel:
-- addition of varaible region size in X and Y -- internal storage of heightmap changed from double[] to short[] -- helper routines for handling internal structure while keeping existing API -- to and from XML that adds region size information (for downward compatibility, output in the legacy XML format if X and Y are 256) Updated and commented Constants.RegionSize but didn't change the name for compatibility.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index c1ffd22..2fff4c1 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -130,15 +130,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
130 { 130 {
131 if (m_scene.Heightmap == null) 131 if (m_scene.Heightmap == null)
132 { 132 {
133 m_channel = new TerrainChannel(m_InitialTerrain); 133 m_channel = new TerrainChannel(m_InitialTerrain,
134 m_scene.RegionInfo.RegionSizeX, m_scene.RegionInfo.RegionSizeY, m_scene.RegionInfo.RegionSizeZ);
134 m_scene.Heightmap = m_channel; 135 m_scene.Heightmap = m_channel;
135 m_revert = new TerrainChannel();
136 UpdateRevertMap(); 136 UpdateRevertMap();
137 } 137 }
138 else 138 else
139 { 139 {
140 m_channel = m_scene.Heightmap; 140 m_channel = m_scene.Heightmap;
141 m_revert = new TerrainChannel();
142 UpdateRevertMap(); 141 UpdateRevertMap();
143 } 142 }
144 143
@@ -532,6 +531,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
532 /// </summary> 531 /// </summary>
533 public void UpdateRevertMap() 532 public void UpdateRevertMap()
534 { 533 {
534 /*
535 int x; 535 int x;
536 for (x = 0; x < m_channel.Width; x++) 536 for (x = 0; x < m_channel.Width; x++)
537 { 537 {
@@ -541,6 +541,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
541 m_revert[x, y] = m_channel[x, y]; 541 m_revert[x, y] = m_channel[x, y];
542 } 542 }
543 } 543 }
544 */
545 m_revert = m_channel.MakeCopy();
544 } 546 }
545 547
546 /// <summary> 548 /// <summary>