well.. put the ode locks back, for now
parent
d7d5f9f775
commit
44d6746f40
|
@ -124,8 +124,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
/// /lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x7f03c9849c60]
|
||||
/// .../opensim/bin/libode-x86_64.so(_Z12dCollideCCTLP6dxGeomS0_iP12dContactGeomi+0x92) [0x7f03b44bcf82]
|
||||
/// </remarks>
|
||||
// internal static Object UniversalColliderSyncObject = new Object();
|
||||
internal static Object SimulationLock = new Object();
|
||||
internal static object UniversalColliderSyncObject = new object();
|
||||
internal static object SimulationLock = new object();
|
||||
|
||||
/// <summary>
|
||||
/// Is stats collecting enabled for this ODE scene?
|
||||
|
@ -880,7 +880,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
{
|
||||
int count;
|
||||
|
||||
// lock (OdeScene.UniversalColliderSyncObject)
|
||||
lock (OdeScene.UniversalColliderSyncObject)
|
||||
{
|
||||
// We do this inside the lock so that we don't count any delay in acquiring it
|
||||
if (CollectStats)
|
||||
|
@ -2869,7 +2869,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
tempTick = tempTick2;
|
||||
}
|
||||
|
||||
// lock(SimulationLock)
|
||||
lock(SimulationLock)
|
||||
SafeNativeMethods.WorldQuickStep(world, ODE_STEPSIZE);
|
||||
|
||||
if (CollectStats)
|
||||
|
|
|
@ -282,7 +282,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
public IntPtr GroundSpace; // space for ground
|
||||
|
||||
public object OdeLock = new object();
|
||||
// public static object SimulationLock = new object();
|
||||
public static object SimulationLock = new object();
|
||||
|
||||
public IMesher mesher;
|
||||
|
||||
|
@ -1214,7 +1214,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
OdePrim newPrim;
|
||||
lock (OdeLock)
|
||||
{
|
||||
|
||||
newPrim = new OdePrim(name, this, position, size, rotation, pbs, isphysical, isPhantom, shapeType, localID);
|
||||
}
|
||||
return newPrim;
|
||||
|
@ -1452,12 +1451,15 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
if (item.actor != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (SimulationLock)
|
||||
{
|
||||
if (item.actor is OdeCharacter)
|
||||
((OdeCharacter)item.actor).DoAChange(item.what, item.arg);
|
||||
else if (((OdePrim)item.actor).DoAChange(item.what, item.arg))
|
||||
RemovePrimThreadLocked((OdePrim)item.actor);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_log.WarnFormat("[PHYSICS]: Operation failed for a actor {0} {1}",
|
||||
|
@ -1545,12 +1547,15 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
if (item.actor != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (SimulationLock)
|
||||
{
|
||||
if (item.actor is OdeCharacter)
|
||||
((OdeCharacter)item.actor).DoAChange(item.what, item.arg);
|
||||
else if (((OdePrim)item.actor).DoAChange(item.what, item.arg))
|
||||
RemovePrimThreadLocked((OdePrim)item.actor);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
m_log.WarnFormat("[PHYSICS]: doChange failed for a actor {0} {1}",
|
||||
|
@ -1601,17 +1606,19 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
aprim.Move();
|
||||
}
|
||||
}
|
||||
// moveTime += Util.GetTimeStampMS() - tmpTime;
|
||||
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
// moveTime += Util.GetTimeStampMS() - tmpTime;
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
lock (SimulationLock)
|
||||
{
|
||||
m_rayCastManager.ProcessQueuedRequests();
|
||||
// rayTime += Util.GetTimeStampMS() - tmpTime;
|
||||
// rayTime += Util.GetTimeStampMS() - tmpTime;
|
||||
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
collision_optimized();
|
||||
// collisionTime += Util.GetTimeStampMS() - tmpTime;
|
||||
}
|
||||
// collisionTime += Util.GetTimeStampMS() - tmpTime;
|
||||
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
lock(_collisionEventPrimRemove)
|
||||
{
|
||||
foreach (PhysicsActor obj in _collisionEventPrimRemove)
|
||||
|
@ -1650,13 +1657,16 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
|||
foreach(OdePrim prm in sleepers)
|
||||
prm.SleeperAddCollisionEvents();
|
||||
sleepers.Clear();
|
||||
// collisonRepo += Util.GetTimeStampMS() - tmpTime;
|
||||
// collisonRepo += Util.GetTimeStampMS() - tmpTime;
|
||||
|
||||
|
||||
// do a ode simulation step
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
// tmpTime = Util.GetTimeStampMS();
|
||||
lock (SimulationLock)
|
||||
{
|
||||
SafeNativeMethods.WorldQuickStep(world, ODE_STEPSIZE);
|
||||
SafeNativeMethods.JointGroupEmpty(contactgroup);
|
||||
}
|
||||
// qstepTIme += Util.GetTimeStampMS() - tmpTime;
|
||||
|
||||
// update managed ideia of physical data and do updates to core
|
||||
|
|
Loading…
Reference in New Issue