aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authordan miller2007-08-30 23:23:44 +0000
committerdan miller2007-08-30 23:23:44 +0000
commite158a45b09a2706df4b623bd4d264724dc58e0a5 (patch)
tree3c967e954d7da89a811577c06c41fa9eb33faab2 /OpenSim
parentremove debugging statement (diff)
downloadopensim-SC-e158a45b09a2706df4b623bd4d264724dc58e0a5.zip
opensim-SC-e158a45b09a2706df4b623bd4d264724dc58e0a5.tar.gz
opensim-SC-e158a45b09a2706df4b623bd4d264724dc58e0a5.tar.bz2
opensim-SC-e158a45b09a2706df4b623bd4d264724dc58e0a5.tar.xz
danx0r (first checkin!) fixes OdePlugin.cs RemovePrim() lock bug
Diffstat (limited to 'OpenSim')
-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;