aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-06-13 01:30:39 +0000
committerAdam Frisby2007-06-13 01:30:39 +0000
commitba966216254398700e613480ba0da8795a4c8d4e (patch)
tree10de55aa07bd52524d5857939613d39a2aa88031 /OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
parent*Attempting to get trunk stable before a revert is required. (diff)
downloadopensim-SC-ba966216254398700e613480ba0da8795a4c8d4e.zip
opensim-SC-ba966216254398700e613480ba0da8795a4c8d4e.tar.gz
opensim-SC-ba966216254398700e613480ba0da8795a4c8d4e.tar.bz2
opensim-SC-ba966216254398700e613480ba0da8795a4c8d4e.tar.xz
* Applying danx0r's ODE patch
* ZOMG r1000!
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
index 7debdaa..5233042 100644
--- a/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
@@ -182,7 +182,11 @@ namespace OpenSim.Physics.OdePlugin
182 { 182 {
183 for (int i = 0; i < 65536; i++) 183 for (int i = 0; i < 65536; i++)
184 { 184 {
185 this._heightmap[i] = (double)heightMap[i]; 185 // this._heightmap[i] = (double)heightMap[i];
186 // dbm (danx0r) -- heightmap x,y must be swapped for Ode (should fix ODE, but for now...)
187 int x = i & 0xff;
188 int y = i >> 8;
189 this._heightmap[i] = (double)heightMap[x * 256 + y];
186 } 190 }
187 IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); 191 IntPtr HeightmapData = d.GeomHeightfieldDataCreate();
188 d.GeomHeightfieldDataBuildDouble(HeightmapData, _heightmap, 0, 256, 256, 256, 256, 1.0f, 0.0f, 2.0f, 0); 192 d.GeomHeightfieldDataBuildDouble(HeightmapData, _heightmap, 0, 256, 256, 256, 256, 1.0f, 0.0f, 2.0f, 0);
@@ -335,7 +339,7 @@ namespace OpenSim.Physics.OdePlugin
335 d.Vector3 vec = d.BodyGetPosition(BoundingCapsule); 339 d.Vector3 vec = d.BodyGetPosition(BoundingCapsule);
336 this._position.X = vec.X; 340 this._position.X = vec.X;
337 this._position.Y = vec.Y; 341 this._position.Y = vec.Y;
338 this._position.Z = vec.Z; 342 this._position.Z = vec.Z+1.0f;
339 } 343 }
340 } 344 }
341 345