From adb56a46f49127911a2df169c86f2cdfde034966 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Wed, 11 Apr 2007 05:19:27 +0000 Subject: 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** --- OpenSim.RegionServer/world/World.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim.RegionServer/world/World.cs') 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 { this.phyScene.SetTerrain(Terrain.getHeights1D()); } - this.localStorage.SaveMap(this.Terrain.map); + this.localStorage.SaveMap(this.Terrain.getHeights1D()); foreach (SimClient client in m_clientThreads.Values) { @@ -213,12 +213,12 @@ namespace OpenSim.world public void RegenerateTerrain(float[,] newMap) { - this.Terrain.map = newMap; + this.Terrain.setHeights2D(newMap); lock (this.LockPhysicsEngine) { this.phyScene.SetTerrain(this.Terrain.getHeights1D()); } - this.localStorage.SaveMap(this.Terrain.map); + this.localStorage.SaveMap(this.Terrain.getHeights1D()); foreach (SimClient client in m_clientThreads.Values) { @@ -239,7 +239,7 @@ namespace OpenSim.world { this.phyScene.SetTerrain(this.Terrain.getHeights1D()); } - this.localStorage.SaveMap(this.Terrain.map); + this.localStorage.SaveMap(this.Terrain.getHeights1D()); foreach (SimClient client in m_clientThreads.Values) { @@ -252,7 +252,7 @@ namespace OpenSim.world public void LoadWorldMap() { - float[,] map = this.localStorage.LoadWorld(); + float[] map = this.localStorage.LoadWorld(); if (map == null) { this.Terrain.hills(); @@ -260,7 +260,7 @@ namespace OpenSim.world } else { - this.Terrain.map = map; + this.Terrain.setHeights1D(map); } } -- cgit v1.1