diff options
author | Robert Adams | 2015-03-27 19:32:50 -0700 |
---|---|---|
committer | Robert Adams | 2015-03-27 19:32:50 -0700 |
commit | bedafb8fae9898ef0c5fc6470236ee7244e616a9 (patch) | |
tree | 618728d92dad56dd587c243892d966b9ff9ea89b /OpenSim/Data/Null/NullSimulationData.cs | |
parent | varregion: restore checkAgentAccessToRegion routine in EntityTransferModule. (diff) | |
download | opensim-SC-bedafb8fae9898ef0c5fc6470236ee7244e616a9.zip opensim-SC-bedafb8fae9898ef0c5fc6470236ee7244e616a9.tar.gz opensim-SC-bedafb8fae9898ef0c5fc6470236ee7244e616a9.tar.bz2 opensim-SC-bedafb8fae9898ef0c5fc6470236ee7244e616a9.tar.xz |
varregion: refactor use of 'double heightmap[,]' into references to new class TerrainData
and push the implementation from Scene into the database readers and writers.
Diffstat (limited to 'OpenSim/Data/Null/NullSimulationData.cs')
-rw-r--r-- | OpenSim/Data/Null/NullSimulationData.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs index 15824a9..339e7f4 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; |