diff options
author | Adam Frisby | 2007-06-13 01:31:53 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-13 01:31:53 +0000 |
commit | 93eaddd583e2f7fb7b5b559e6fb4822d70c346f2 (patch) | |
tree | 9634afbb05b5d6b57d20f182f15edebeb450e920 /OpenSim/OpenSim.Physics/OdePlugin | |
parent | * Importing libTerrain-BSD into libraries folder (diff) | |
download | opensim-SC_OLD-93eaddd583e2f7fb7b5b559e6fb4822d70c346f2.zip opensim-SC_OLD-93eaddd583e2f7fb7b5b559e6fb4822d70c346f2.tar.gz opensim-SC_OLD-93eaddd583e2f7fb7b5b559e6fb4822d70c346f2.tar.bz2 opensim-SC_OLD-93eaddd583e2f7fb7b5b559e6fb4822d70c346f2.tar.xz |
* Applying patches to sugilite too.
Diffstat (limited to 'OpenSim/OpenSim.Physics/OdePlugin')
-rw-r--r-- | OpenSim/OpenSim.Physics/OdePlugin/OdePlugin.cs | 9 |
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 | ||