aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Null/NullSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/Null/NullSimulationData.cs')
-rw-r--r--OpenSim/Data/Null/NullSimulationData.cs22
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index d11ad72..deeaced 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -132,18 +132,36 @@ namespace OpenSim.Data.Null
132 return new List<SceneObjectGroup>(); 132 return new List<SceneObjectGroup>();
133 } 133 }
134 134
135 Dictionary<UUID, double[,]> m_terrains = new Dictionary<UUID, double[,]>(); 135 Dictionary<UUID, TerrainData> m_terrains = new Dictionary<UUID, TerrainData>();
136 public void StoreTerrain(double[,] ter, UUID regionID) 136 public void StoreTerrain(TerrainData ter, UUID regionID)
137 { 137 {
138 if (m_terrains.ContainsKey(regionID)) 138 if (m_terrains.ContainsKey(regionID))
139 m_terrains.Remove(regionID); 139 m_terrains.Remove(regionID);
140 m_terrains.Add(regionID, ter); 140 m_terrains.Add(regionID, ter);
141 } 141 }
142 142
143 // Legacy. Just don't do this.
144 public void StoreTerrain(double[,] ter, UUID regionID)
145 {
146 TerrainData terrData = new HeightmapTerrainData(ter);
147 StoreTerrain(terrData, regionID);
148 }
149
150 // Legacy. Just don't do this.
151 // Returns 'null' if region not found
143 public double[,] LoadTerrain(UUID regionID) 152 public double[,] LoadTerrain(UUID regionID)
144 { 153 {
145 if (m_terrains.ContainsKey(regionID)) 154 if (m_terrains.ContainsKey(regionID))
146 { 155 {
156 return m_terrains[regionID].GetDoubles();
157 }
158 return null;
159 }
160
161 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
162 {
163 if (m_terrains.ContainsKey(regionID))
164 {
147 return m_terrains[regionID]; 165 return m_terrains[regionID];
148 } 166 }
149 return null; 167 return null;