diff options
author | Adam Frisby | 2007-04-11 05:19:27 +0000 |
---|---|---|
committer | Adam Frisby | 2007-04-11 05:19:27 +0000 |
commit | adb56a46f49127911a2df169c86f2cdfde034966 (patch) | |
tree | c5a7b5e279f93538c9506f630b7304b9d55e93e8 /OpenSim.RegionServer/world/World.cs | |
parent | (no commit message) (diff) | |
download | opensim-SC-adb56a46f49127911a2df169c86f2cdfde034966.zip opensim-SC-adb56a46f49127911a2df169c86f2cdfde034966.tar.gz opensim-SC-adb56a46f49127911a2df169c86f2cdfde034966.tar.bz2 opensim-SC-adb56a46f49127911a2df169c86f2cdfde034966.tar.xz |
Major ass changes to terrain (now uses libTerrain-BSD!) and all-round improvements to code quality. Terrain saving/loading may work now (running through setHeights1D and getHeights1D before DB4o) **WARNING: UNTESTED**
Diffstat (limited to 'OpenSim.RegionServer/world/World.cs')
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 580804a..c7c57d1 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -198,7 +198,7 @@ namespace OpenSim.world | |||
198 | { | 198 | { |
199 | this.phyScene.SetTerrain(Terrain.getHeights1D()); | 199 | this.phyScene.SetTerrain(Terrain.getHeights1D()); |
200 | } | 200 | } |
201 | this.localStorage.SaveMap(this.Terrain.map); | 201 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
202 | 202 | ||
203 | foreach (SimClient client in m_clientThreads.Values) | 203 | foreach (SimClient client in m_clientThreads.Values) |
204 | { | 204 | { |
@@ -213,12 +213,12 @@ namespace OpenSim.world | |||
213 | 213 | ||
214 | public void RegenerateTerrain(float[,] newMap) | 214 | public void RegenerateTerrain(float[,] newMap) |
215 | { | 215 | { |
216 | this.Terrain.map = newMap; | 216 | this.Terrain.setHeights2D(newMap); |
217 | lock (this.LockPhysicsEngine) | 217 | lock (this.LockPhysicsEngine) |
218 | { | 218 | { |
219 | this.phyScene.SetTerrain(this.Terrain.getHeights1D()); | 219 | this.phyScene.SetTerrain(this.Terrain.getHeights1D()); |
220 | } | 220 | } |
221 | this.localStorage.SaveMap(this.Terrain.map); | 221 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
222 | 222 | ||
223 | foreach (SimClient client in m_clientThreads.Values) | 223 | foreach (SimClient client in m_clientThreads.Values) |
224 | { | 224 | { |
@@ -239,7 +239,7 @@ namespace OpenSim.world | |||
239 | { | 239 | { |
240 | this.phyScene.SetTerrain(this.Terrain.getHeights1D()); | 240 | this.phyScene.SetTerrain(this.Terrain.getHeights1D()); |
241 | } | 241 | } |
242 | this.localStorage.SaveMap(this.Terrain.map); | 242 | this.localStorage.SaveMap(this.Terrain.getHeights1D()); |
243 | 243 | ||
244 | foreach (SimClient client in m_clientThreads.Values) | 244 | foreach (SimClient client in m_clientThreads.Values) |
245 | { | 245 | { |
@@ -252,7 +252,7 @@ namespace OpenSim.world | |||
252 | 252 | ||
253 | public void LoadWorldMap() | 253 | public void LoadWorldMap() |
254 | { | 254 | { |
255 | float[,] map = this.localStorage.LoadWorld(); | 255 | float[] map = this.localStorage.LoadWorld(); |
256 | if (map == null) | 256 | if (map == null) |
257 | { | 257 | { |
258 | this.Terrain.hills(); | 258 | this.Terrain.hills(); |
@@ -260,7 +260,7 @@ namespace OpenSim.world | |||
260 | } | 260 | } |
261 | else | 261 | else |
262 | { | 262 | { |
263 | this.Terrain.map = map; | 263 | this.Terrain.setHeights1D(map); |
264 | } | 264 | } |
265 | } | 265 | } |
266 | 266 | ||