diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 472a10b..808f7c2 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -405,7 +405,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
405 | { | 405 | { |
406 | lock (OdeLock) | 406 | lock (OdeLock) |
407 | { | 407 | { |
408 | _activeprims.Remove(deactivatePrim); | 408 | lock (_activeprims) |
409 | { | ||
410 | _activeprims.Remove(deactivatePrim); | ||
411 | } | ||
409 | } | 412 | } |
410 | } | 413 | } |
411 | public int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount) | 414 | public int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount) |
@@ -1174,7 +1177,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1174 | _mesh = mesh; | 1177 | _mesh = mesh; |
1175 | _pbs = pbs; | 1178 | _pbs = pbs; |
1176 | _parent_scene = parent_scene; | 1179 | _parent_scene = parent_scene; |
1180 | |||
1181 | if (pos.Z < 0) | ||
1182 | m_isphysical = false; | ||
1183 | else | ||
1177 | m_isphysical = pisPhysical; | 1184 | m_isphysical = pisPhysical; |
1185 | |||
1178 | m_primName = primName; | 1186 | m_primName = primName; |
1179 | 1187 | ||
1180 | 1188 | ||
@@ -1581,19 +1589,21 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1581 | // Sim resources and memory. | 1589 | // Sim resources and memory. |
1582 | // Disables the prim's movement physics.... | 1590 | // Disables the prim's movement physics.... |
1583 | // It's a hack and will generate a console message if it fails. | 1591 | // It's a hack and will generate a console message if it fails. |
1584 | 1592 | lock (OdeScene.OdeLock) | |
1585 | try | ||
1586 | { | 1593 | { |
1587 | disableBody(); | 1594 | try |
1595 | { | ||
1596 | disableBody(); | ||
1588 | 1597 | ||
1589 | } | 1598 | } |
1590 | catch (System.Exception e) | 1599 | catch (System.Exception e) |
1591 | { | ||
1592 | if (Body != (IntPtr)0) | ||
1593 | { | 1600 | { |
1594 | d.BodyDestroy(Body); | 1601 | if (Body != (IntPtr)0) |
1595 | Body = (IntPtr)0; | 1602 | { |
1603 | d.BodyDestroy(Body); | ||
1604 | Body = (IntPtr)0; | ||
1596 | 1605 | ||
1606 | } | ||
1597 | } | 1607 | } |
1598 | } | 1608 | } |
1599 | 1609 | ||