diff options
author | Adam Frisby | 2007-08-01 21:27:58 +0000 |
---|---|---|
committer | Adam Frisby | 2007-08-01 21:27:58 +0000 |
commit | d2c7bd3fff334f9453d16cab472ff05dd027206f (patch) | |
tree | 6a598f2552d25b59f4ee997dd55c065108a7f0b4 | |
parent | * Updated CONTRIBUTORS.txt - added new "Testers" section. (diff) | |
download | opensim-SC_OLD-d2c7bd3fff334f9453d16cab472ff05dd027206f.zip opensim-SC_OLD-d2c7bd3fff334f9453d16cab472ff05dd027206f.tar.gz opensim-SC_OLD-d2c7bd3fff334f9453d16cab472ff05dd027206f.tar.bz2 opensim-SC_OLD-d2c7bd3fff334f9453d16cab472ff05dd027206f.tar.xz |
* Terrain engine now knows the region coordinates - this can be later used to allow loading of single terrain files for multiple regions.
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d75a7f3..f9fbe87 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
157 | 157 | ||
158 | 158 | ||
159 | MainLog.Instance.Verbose("Creating LandMap"); | 159 | MainLog.Instance.Verbose("Creating LandMap"); |
160 | Terrain = new TerrainEngine(); | 160 | Terrain = new TerrainEngine((int)this.RegionInfo.RegionLocX, (int)this.RegionInfo.RegionLocY); |
161 | 161 | ||
162 | ScenePresence.LoadAnims(); | 162 | ScenePresence.LoadAnims(); |
163 | 163 | ||
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index f37d625..b54f4fe 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | |||
@@ -88,14 +88,24 @@ namespace OpenSim.Region.Terrain | |||
88 | int w, h; | 88 | int w, h; |
89 | 89 | ||
90 | /// <summary> | 90 | /// <summary> |
91 | /// Used to determine what offset to use when loading singular heightmaps across multiple sims | ||
92 | /// </summary> | ||
93 | private int offsetX; | ||
94 | private int offsetY; | ||
95 | |||
96 | |||
97 | /// <summary> | ||
91 | /// Generate a new TerrainEngine instance and creates a new heightmap | 98 | /// Generate a new TerrainEngine instance and creates a new heightmap |
92 | /// </summary> | 99 | /// </summary> |
93 | public TerrainEngine() | 100 | public TerrainEngine(int X, int Y) |
94 | { | 101 | { |
95 | w = 256; | 102 | w = 256; |
96 | h = 256; | 103 | h = 256; |
97 | heightmap = new Channel(w, h); | 104 | heightmap = new Channel(w, h); |
98 | 105 | ||
106 | offsetX = X; | ||
107 | offsetY = Y; | ||
108 | |||
99 | tainted++; | 109 | tainted++; |
100 | } | 110 | } |
101 | 111 | ||