diff options
-rw-r--r-- | OpenSim.Physics/Manager/PhysicsScene.cs | 4 | ||||
-rw-r--r-- | OpenSim.Physics/OdePlugin/OdePlugin.cs | 2 | ||||
-rw-r--r-- | OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs | 2 | ||||
-rw-r--r-- | OpenSim.RegionServer/OpenSimMain.cs | 2 | ||||
-rw-r--r-- | OpenSim.RegionServer/world/World.cs | 10 | ||||
-rw-r--r-- | OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | 9 | ||||
-rw-r--r-- | OpenSim.Storage/LocalStorageDb4o/MapStorage.cs | 2 |
7 files changed, 16 insertions, 15 deletions
diff --git a/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim.Physics/Manager/PhysicsScene.cs index 25e2104..0b3dfd2 100644 --- a/OpenSim.Physics/Manager/PhysicsScene.cs +++ b/OpenSim.Physics/Manager/PhysicsScene.cs | |||
@@ -49,7 +49,7 @@ namespace OpenSim.Physics.Manager | |||
49 | 49 | ||
50 | public abstract void GetResults(); | 50 | public abstract void GetResults(); |
51 | 51 | ||
52 | public abstract void SetTerrain(float[,] heightMap); | 52 | public abstract void SetTerrain(float[] heightMap); |
53 | 53 | ||
54 | public abstract void DeleteTerrain(); | 54 | public abstract void DeleteTerrain(); |
55 | 55 | ||
@@ -87,7 +87,7 @@ namespace OpenSim.Physics.Manager | |||
87 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : GetResults()"); | 87 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : GetResults()"); |
88 | } | 88 | } |
89 | 89 | ||
90 | public override void SetTerrain(float[,] heightMap) | 90 | public override void SetTerrain(float[] heightMap) |
91 | { | 91 | { |
92 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); | 92 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); |
93 | } | 93 | } |
diff --git a/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim.Physics/OdePlugin/OdePlugin.cs index 7c9c684..325e2fd 100644 --- a/OpenSim.Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim.Physics/OdePlugin/OdePlugin.cs | |||
@@ -173,7 +173,7 @@ namespace OpenSim.Physics.OdePlugin | |||
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
176 | public override void SetTerrain(float[,] heightMap) | 176 | public override void SetTerrain(float[] heightMap) |
177 | { | 177 | { |
178 | for (int i = 0; i < 65536; i++) | 178 | for (int i = 0; i < 65536; i++) |
179 | { | 179 | { |
diff --git a/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs index 74e7cb8..10e92fe 100644 --- a/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs | |||
@@ -173,7 +173,7 @@ namespace OpenSim.Physics.PhysXPlugin | |||
173 | } | 173 | } |
174 | } | 174 | } |
175 | 175 | ||
176 | public override void SetTerrain(float[,] heightMap) | 176 | public override void SetTerrain(float[] heightMap) |
177 | { | 177 | { |
178 | if (this._heightMap != null) | 178 | if (this._heightMap != null) |
179 | { | 179 | { |
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs index b159af0..fa5dfc2 100644 --- a/OpenSim.RegionServer/OpenSimMain.cs +++ b/OpenSim.RegionServer/OpenSimMain.cs | |||
@@ -156,7 +156,7 @@ namespace OpenSim | |||
156 | 156 | ||
157 | m_console.WriteLine("Main.cs:Startup() - Starting up messaging system"); | 157 | m_console.WriteLine("Main.cs:Startup() - Starting up messaging system"); |
158 | LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use | 158 | LocalWorld.PhysScene = this.physManager.GetPhysicsScene(this.m_physicsEngine); //should be reading from the config file what physics engine to use |
159 | LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.map); | 159 | LocalWorld.PhysScene.SetTerrain(LocalWorld.Terrain.getHeights1D()); |
160 | 160 | ||
161 | //should be passing a IGenericConfig object to these so they can read the config data they want from it | 161 | //should be passing a IGenericConfig object to these so they can read the config data they want from it |
162 | GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey); | 162 | GridServers.AssetServer.SetServerInfo(regionData.AssetURL, regionData.AssetSendKey); |
diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index c23ac2d..73c04d8 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs | |||
@@ -195,7 +195,7 @@ namespace OpenSim.world | |||
195 | 195 | ||
196 | lock (this.LockPhysicsEngine) | 196 | lock (this.LockPhysicsEngine) |
197 | { | 197 | { |
198 | this.phyScene.SetTerrain(Terrain.map); | 198 | this.phyScene.SetTerrain(Terrain.getHeights1D()); |
199 | } | 199 | } |
200 | this.localStorage.SaveMap(this.Terrain.map); | 200 | this.localStorage.SaveMap(this.Terrain.map); |
201 | 201 | ||
@@ -215,7 +215,7 @@ namespace OpenSim.world | |||
215 | this.Terrain.map = newMap; | 215 | this.Terrain.map = newMap; |
216 | lock (this.LockPhysicsEngine) | 216 | lock (this.LockPhysicsEngine) |
217 | { | 217 | { |
218 | this.phyScene.SetTerrain(this.Terrain.map); | 218 | this.phyScene.SetTerrain(this.Terrain.getHeights1D()); |
219 | } | 219 | } |
220 | this.localStorage.SaveMap(this.Terrain.map); | 220 | this.localStorage.SaveMap(this.Terrain.map); |
221 | 221 | ||
@@ -236,7 +236,7 @@ namespace OpenSim.world | |||
236 | { | 236 | { |
237 | lock (this.LockPhysicsEngine) | 237 | lock (this.LockPhysicsEngine) |
238 | { | 238 | { |
239 | this.phyScene.SetTerrain(this.Terrain.map); | 239 | this.phyScene.SetTerrain(this.Terrain.getHeights1D()); |
240 | } | 240 | } |
241 | this.localStorage.SaveMap(this.Terrain.map); | 241 | this.localStorage.SaveMap(this.Terrain.map); |
242 | 242 | ||
@@ -290,7 +290,7 @@ namespace OpenSim.world | |||
290 | patches[2] = x + 2 + y * 16; | 290 | patches[2] = x + 2 + y * 16; |
291 | patches[3] = x + 3 + y * 16; | 291 | patches[3] = x + 3 + y * 16; |
292 | 292 | ||
293 | Packet layerpack = TerrainManager.CreateLandPacket(Terrain.map, patches); | 293 | Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches); |
294 | RemoteClient.OutPacket(layerpack); | 294 | RemoteClient.OutPacket(layerpack); |
295 | } | 295 | } |
296 | } | 296 | } |
@@ -312,7 +312,7 @@ namespace OpenSim.world | |||
312 | //patches[2] = patchx + 2 + patchy * 16; | 312 | //patches[2] = patchx + 2 + patchy * 16; |
313 | //patches[3] = patchx + 3 + patchy * 16; | 313 | //patches[3] = patchx + 3 + patchy * 16; |
314 | 314 | ||
315 | Packet layerpack = TerrainManager.CreateLandPacket(Terrain.map, patches); | 315 | Packet layerpack = TerrainManager.CreateLandPacket(Terrain.getHeights1D(), patches); |
316 | RemoteClient.OutPacket(layerpack); | 316 | RemoteClient.OutPacket(layerpack); |
317 | } | 317 | } |
318 | 318 | ||
diff --git a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs index cdab9ba..b5fa79b 100644 --- a/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs | |||
@@ -118,11 +118,11 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
121 | public float[] LoadWorld() | 121 | public float[,] LoadWorld() |
122 | { | 122 | { |
123 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Loading world...."); | 123 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Loading world...."); |
124 | //World blank = new World(); | 124 | //World blank = new World(); |
125 | float[] heightmap = null; | 125 | float[,] heightmap = null; |
126 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Looking for a heightmap in local DB"); | 126 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Looking for a heightmap in local DB"); |
127 | IObjectSet world_result = db.Get(typeof(MapStorage)); | 127 | IObjectSet world_result = db.Get(typeof(MapStorage)); |
128 | if (world_result.Count > 0) | 128 | if (world_result.Count > 0) |
@@ -137,7 +137,8 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
137 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one"); | 137 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - No heightmap found, generating new one"); |
138 | HeightmapGenHills hills = new HeightmapGenHills(); | 138 | HeightmapGenHills hills = new HeightmapGenHills(); |
139 | // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); | 139 | // blank.LandMap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); |
140 | heightmap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); | 140 | // heightmap = hills.GenerateHeightmap(200, 4.0f, 80.0f, false); |
141 | heightmap = new float[256, 256]; | ||
141 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Saving heightmap to local database"); | 142 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine("LoadWorld() - Saving heightmap to local database"); |
142 | MapStorage map = new MapStorage(); | 143 | MapStorage map = new MapStorage(); |
143 | map.Map = heightmap; //blank.LandMap; | 144 | map.Map = heightmap; //blank.LandMap; |
@@ -147,7 +148,7 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
147 | return heightmap; | 148 | return heightmap; |
148 | } | 149 | } |
149 | 150 | ||
150 | public void SaveMap(float[] heightmap) | 151 | public void SaveMap(float[,] heightmap) |
151 | { | 152 | { |
152 | IObjectSet world_result = db.Get(typeof(MapStorage)); | 153 | IObjectSet world_result = db.Get(typeof(MapStorage)); |
153 | if (world_result.Count > 0) | 154 | if (world_result.Count > 0) |
diff --git a/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs index db590ff..dc5793e 100644 --- a/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs +++ b/OpenSim.Storage/LocalStorageDb4o/MapStorage.cs | |||
@@ -6,7 +6,7 @@ namespace OpenSim.Storage.LocalStorageDb4o | |||
6 | { | 6 | { |
7 | public class MapStorage | 7 | public class MapStorage |
8 | { | 8 | { |
9 | public float[] Map; | 9 | public float[,] Map; |
10 | 10 | ||
11 | public MapStorage() | 11 | public MapStorage() |
12 | { | 12 | { |