* Terrain engine now knows the region coordinates - this can be later used to allow loading of single terrain files for multiple regions.

afrisby
Adam Frisby 2007-08-01 21:27:58 +00:00
parent d5bfb10dd0
commit d2c7bd3fff
2 changed files with 12 additions and 2 deletions

View File

@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes
MainLog.Instance.Verbose("Creating LandMap"); MainLog.Instance.Verbose("Creating LandMap");
Terrain = new TerrainEngine(); Terrain = new TerrainEngine((int)this.RegionInfo.RegionLocX, (int)this.RegionInfo.RegionLocY);
ScenePresence.LoadAnims(); ScenePresence.LoadAnims();

View File

@ -87,15 +87,25 @@ namespace OpenSim.Region.Terrain
int w, h; int w, h;
/// <summary>
/// Used to determine what offset to use when loading singular heightmaps across multiple sims
/// </summary>
private int offsetX;
private int offsetY;
/// <summary> /// <summary>
/// Generate a new TerrainEngine instance and creates a new heightmap /// Generate a new TerrainEngine instance and creates a new heightmap
/// </summary> /// </summary>
public TerrainEngine() public TerrainEngine(int X, int Y)
{ {
w = 256; w = 256;
h = 256; h = 256;
heightmap = new Channel(w, h); heightmap = new Channel(w, h);
offsetX = X;
offsetY = Y;
tainted++; tainted++;
} }