diff options
author | UbitUmarov | 2015-11-27 22:50:28 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-27 22:50:28 +0000 |
commit | f59350a1ee7adb13e1ad85c9189a5676dc2b002a (patch) | |
tree | d1971c254dfbb22278fab812cc47b66ec37be174 /OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | |
parent | add missing Xengine MinTimerInterval to opensim.ini.example (diff) | |
download | opensim-SC-f59350a1ee7adb13e1ad85c9189a5676dc2b002a.zip opensim-SC-f59350a1ee7adb13e1ad85c9189a5676dc2b002a.tar.gz opensim-SC-f59350a1ee7adb13e1ad85c9189a5676dc2b002a.tar.bz2 opensim-SC-f59350a1ee7adb13e1ad85c9189a5676dc2b002a.tar.xz |
add a nasty global lock, ode.dll requires on multi regions per instance ( also make sure ninjaJoints are disabled
Diffstat (limited to 'OpenSim/Region/PhysicsModules/Ode/OdeScene.cs')
-rw-r--r-- | OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs index 040322a..7ba2083 100644 --- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs +++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs | |||
@@ -125,7 +125,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
125 | /// .../opensim/bin/libode-x86_64.so(_Z12dCollideCCTLP6dxGeomS0_iP12dContactGeomi+0x92) [0x7f03b44bcf82] | 125 | /// .../opensim/bin/libode-x86_64.so(_Z12dCollideCCTLP6dxGeomS0_iP12dContactGeomi+0x92) [0x7f03b44bcf82] |
126 | /// </remarks> | 126 | /// </remarks> |
127 | internal static Object UniversalColliderSyncObject = new Object(); | 127 | internal static Object UniversalColliderSyncObject = new Object(); |
128 | 128 | internal static Object SimulationLock = new Object(); | |
129 | |||
129 | /// <summary> | 130 | /// <summary> |
130 | /// Is stats collecting enabled for this ODE scene? | 131 | /// Is stats collecting enabled for this ODE scene? |
131 | /// </summary> | 132 | /// </summary> |
@@ -647,7 +648,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
647 | physics_logging_interval = physicsconfig.GetInt("physics_logging_interval", 0); | 648 | physics_logging_interval = physicsconfig.GetInt("physics_logging_interval", 0); |
648 | physics_logging_append_existing_logfile = physicsconfig.GetBoolean("physics_logging_append_existing_logfile", false); | 649 | physics_logging_append_existing_logfile = physicsconfig.GetBoolean("physics_logging_append_existing_logfile", false); |
649 | 650 | ||
650 | m_NINJA_physics_joints_enabled = physicsconfig.GetBoolean("use_NINJA_physics_joints", false); | 651 | // m_NINJA_physics_joints_enabled = physicsconfig.GetBoolean("use_NINJA_physics_joints", false); |
651 | minimumGroundFlightOffset = physicsconfig.GetFloat("minimum_ground_flight_offset", 3f); | 652 | minimumGroundFlightOffset = physicsconfig.GetFloat("minimum_ground_flight_offset", 3f); |
652 | maximumMassObject = physicsconfig.GetFloat("maximum_mass_object", 10000.01f); | 653 | maximumMassObject = physicsconfig.GetFloat("maximum_mass_object", 10000.01f); |
653 | } | 654 | } |
@@ -2714,6 +2715,7 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2714 | CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks | 2715 | CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks |
2715 | } | 2716 | } |
2716 | 2717 | ||
2718 | |||
2717 | lock (OdeLock) | 2719 | lock (OdeLock) |
2718 | { | 2720 | { |
2719 | d.AllocateODEDataForThread(~0U); | 2721 | d.AllocateODEDataForThread(~0U); |
@@ -2867,7 +2869,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
2867 | tempTick = tempTick2; | 2869 | tempTick = tempTick2; |
2868 | } | 2870 | } |
2869 | 2871 | ||
2870 | d.WorldQuickStep(world, ODE_STEPSIZE); | 2872 | lock(SimulationLock) |
2873 | d.WorldQuickStep(world, ODE_STEPSIZE); | ||
2871 | 2874 | ||
2872 | if (CollectStats) | 2875 | if (CollectStats) |
2873 | m_stats[ODENativeStepFrameMsStatName] += Util.EnvironmentTickCountSubtract(tempTick); | 2876 | m_stats[ODENativeStepFrameMsStatName] += Util.EnvironmentTickCountSubtract(tempTick); |
@@ -3377,7 +3380,8 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3377 | [HandleProcessCorruptedStateExceptions] | 3380 | [HandleProcessCorruptedStateExceptions] |
3378 | public override void Dispose() | 3381 | public override void Dispose() |
3379 | { | 3382 | { |
3380 | lock (OdeLock) | 3383 | lock(SimulationLock) |
3384 | lock(OdeLock) | ||
3381 | { | 3385 | { |
3382 | if(world == IntPtr.Zero) | 3386 | if(world == IntPtr.Zero) |
3383 | return; | 3387 | return; |
@@ -3425,7 +3429,6 @@ namespace OpenSim.Region.PhysicsModule.ODE | |||
3425 | { | 3429 | { |
3426 | m_log.ErrorFormat("[ODE SCENE]: exception {0}", e.Message); | 3430 | m_log.ErrorFormat("[ODE SCENE]: exception {0}", e.Message); |
3427 | } | 3431 | } |
3428 | //d.CloseODE(); | ||
3429 | } | 3432 | } |
3430 | } | 3433 | } |
3431 | 3434 | ||