diff options
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 12 | ||||
-rw-r--r-- | OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 73c04d8..580804a 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -59,6 +59,7 @@ namespace OpenSim.world | |||
59 | 59 | ||
60 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap"); | 60 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap"); |
61 | TerrainManager = new TerrainManager(new SecondLife()); | 61 | TerrainManager = new TerrainManager(new SecondLife()); |
62 | Terrain = new TerrainEngine(); | ||
62 | Avatar.SetupTemplate("avatar-template.dat"); | 63 | Avatar.SetupTemplate("avatar-template.dat"); |
63 | // MainConsole.Instance.WriteLine("World.cs - Creating script engine instance"); | 64 | // MainConsole.Instance.WriteLine("World.cs - Creating script engine instance"); |
64 | // Initialise this only after the world has loaded | 65 | // Initialise this only after the world has loaded |
@@ -251,7 +252,16 @@ namespace OpenSim.world | |||
251 | 252 | ||
252 | public void LoadWorldMap() | 253 | public void LoadWorldMap() |
253 | { | 254 | { |
254 | Terrain.map = this.localStorage.LoadWorld(); | 255 | float[,] map = this.localStorage.LoadWorld(); |
256 | if (map == null) | ||
257 | { | ||
258 | this.Terrain.hills(); | ||
259 | //this.localStorage.SaveMap(this.Terrain.map); | ||
260 | } | ||
261 | else | ||
262 | { | ||
263 | this.Terrain.map = map; | ||
264 | } | ||
255 | } | 265 | } |
256 | 266 | ||
257 | public void LoadPrimsFromStorage() | 267 | public void LoadPrimsFromStorage() |
diff --git a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs index b5fa79b..189ee1a 100644 --- a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | |||
@@ -134,6 +134,7 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
134 | } | 134 | } |
135 | else | 135 | else |
136 | { | 136 | { |
137 | /* | ||
137 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one"); | 138 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one"); |
138 | HeightmapGenHills hills = new HeightmapGenHills(); | 139 | HeightmapGenHills hills = new HeightmapGenHills(); |
139 | // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); | 140 | // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); |
@@ -144,6 +145,7 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
144 | map.Map = heightmap; //blank.LandMap; | 145 | map.Map = heightmap; //blank.LandMap; |
145 | db.Set(map); | 146 | db.Set(map); |
146 | db.Commit(); | 147 | db.Commit(); |
148 | */ | ||
147 | } | 149 | } |
148 | return heightmap; | 150 | return heightmap; |
149 | } | 151 | } |