aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs b/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
index 84592ae..5233042 100644
--- a/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs
@@ -105,7 +105,6 @@ namespace OpenSim.Physics.OdePlugin
105 // This function blatantly ripped off from BoxStack.cs 105 // This function blatantly ripped off from BoxStack.cs
106 static private void near(IntPtr space, IntPtr g1, IntPtr g2) 106 static private void near(IntPtr space, IntPtr g1, IntPtr g2)
107 { 107 {
108 //Console.WriteLine("collision callback");
109 IntPtr b1 = d.GeomGetBody(g1); 108 IntPtr b1 = d.GeomGetBody(g1);
110 IntPtr b2 = d.GeomGetBody(g2); 109 IntPtr b2 = d.GeomGetBody(g2);
111 if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact)) 110 if (b1 != IntPtr.Zero && b2 != IntPtr.Zero && d.AreConnectedExcluding(b1, b2, d.JointType.Contact))
@@ -183,7 +182,11 @@ namespace OpenSim.Physics.OdePlugin
183 { 182 {
184 for (int i = 0; i < 65536; i++) 183 for (int i = 0; i < 65536; i++)
185 { 184 {
186 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];
187 } 190 }
188 IntPtr HeightmapData = d.GeomHeightfieldDataCreate(); 191 IntPtr HeightmapData = d.GeomHeightfieldDataCreate();
189 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);
@@ -336,7 +339,7 @@ namespace OpenSim.Physics.OdePlugin
336 d.Vector3 vec = d.BodyGetPosition(BoundingCapsule); 339 d.Vector3 vec = d.BodyGetPosition(BoundingCapsule);
337 this._position.X = vec.X; 340 this._position.X = vec.X;
338 this._position.Y = vec.Y; 341 this._position.Y = vec.Y;
339 this._position.Z = vec.Z; 342 this._position.Z = vec.Z+1.0f;
340 } 343 }
341 } 344 }
342 345