compiles and works just weird terrain problem (and terrain saving is currently not functional)
parent
0311fef244
commit
0879e6427e
|
@ -59,6 +59,7 @@ namespace OpenSim.world
|
||||||
|
|
||||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap");
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("World.cs - creating LandMap");
|
||||||
TerrainManager = new TerrainManager(new SecondLife());
|
TerrainManager = new TerrainManager(new SecondLife());
|
||||||
|
Terrain = new TerrainEngine();
|
||||||
Avatar.SetupTemplate("avatar-template.dat");
|
Avatar.SetupTemplate("avatar-template.dat");
|
||||||
// MainConsole.Instance.WriteLine("World.cs - Creating script engine instance");
|
// MainConsole.Instance.WriteLine("World.cs - Creating script engine instance");
|
||||||
// Initialise this only after the world has loaded
|
// Initialise this only after the world has loaded
|
||||||
|
@ -251,7 +252,16 @@ namespace OpenSim.world
|
||||||
|
|
||||||
public void LoadWorldMap()
|
public void LoadWorldMap()
|
||||||
{
|
{
|
||||||
Terrain.map = this.localStorage.LoadWorld();
|
float[,] map = this.localStorage.LoadWorld();
|
||||||
|
if (map == null)
|
||||||
|
{
|
||||||
|
this.Terrain.hills();
|
||||||
|
//this.localStorage.SaveMap(this.Terrain.map);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Terrain.map = map;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadPrimsFromStorage()
|
public void LoadPrimsFromStorage()
|
||||||
|
|
|
@ -134,6 +134,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one");
|
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one");
|
||||||
HeightmapGenHills hills = new HeightmapGenHills();
|
HeightmapGenHills hills = new HeightmapGenHills();
|
||||||
// blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false);
|
// blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false);
|
||||||
|
@ -144,6 +145,7 @@ namespace OpenSim.Storage.LocalStorageDb4o
|
||||||
map.Map = heightmap; //blank.LandMap;
|
map.Map = heightmap; //blank.LandMap;
|
||||||
db.Set(map);
|
db.Set(map);
|
||||||
db.Commit();
|
db.Commit();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
return heightmap;
|
return heightmap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue