aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 3cc690d..62b6fb7 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -144,8 +144,11 @@ namespace OpenSim.Region.Physics.OdePlugin
144 { 144 {
145 if (prim is OdePrim) 145 if (prim is OdePrim)
146 { 146 {
147 d.GeomDestroy(((OdePrim)prim).prim_geom); 147 lock (OdeLock)
148 this._prims.Remove((OdePrim)prim); 148 {
149 d.GeomDestroy(((OdePrim)prim).prim_geom);
150 this._prims.Remove((OdePrim)prim);
151 }
149 } 152 }
150 } 153 }
151 154
@@ -221,10 +224,10 @@ namespace OpenSim.Region.Physics.OdePlugin
221 int y = i >> 8; 224 int y = i >> 8;
222 this._heightmap[i] = (double)heightMap[x * 256 + y]; 225 this._heightmap[i] = (double)heightMap[x * 256 + y];
223 } 226 }
224 IntPtr HeightmapData = d.GeomHeightfieldDataCreate();
225 227
226 lock (OdeLock) 228 lock (OdeLock)
227 { 229 {
230 IntPtr HeightmapData = d.GeomHeightfieldDataCreate();
228 d.GeomHeightfieldDataBuildDouble(HeightmapData, _heightmap, 0, 256, 256, 256, 256, 1.0f, 0.0f, 2.0f, 0); 231 d.GeomHeightfieldDataBuildDouble(HeightmapData, _heightmap, 0, 256, 256, 256, 256, 1.0f, 0.0f, 2.0f, 0);
229 d.GeomHeightfieldDataSetBounds(HeightmapData, 256, 256); 232 d.GeomHeightfieldDataSetBounds(HeightmapData, 256, 256);
230 LandGeom = d.CreateHeightfield(space, HeightmapData, 1); 233 LandGeom = d.CreateHeightfield(space, HeightmapData, 1);
@@ -427,9 +430,9 @@ namespace OpenSim.Region.Physics.OdePlugin
427 _size = size; 430 _size = size;
428 _acceleration = new PhysicsVector(); 431 _acceleration = new PhysicsVector();
429 _orientation = rotation; 432 _orientation = rotation;
430 prim_geom = d.CreateBox(OdeScene.space, _size.X, _size.Y, _size.Z);
431 lock (OdeScene.OdeLock) 433 lock (OdeScene.OdeLock)
432 { 434 {
435 prim_geom = d.CreateBox(OdeScene.space, _size.X, _size.Y, _size.Z);
433 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 436 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
434 d.Quaternion myrot = new d.Quaternion(); 437 d.Quaternion myrot = new d.Quaternion();
435 myrot.W = rotation.w; 438 myrot.W = rotation.w;