let ode also finish internal representation of prim actors, before simulation

avinationmerge
UbitUmarov 2015-10-22 18:03:49 +01:00
parent 7cb6ecb9f5
commit 8ed17f745d
1 changed files with 40 additions and 0 deletions

View File

@ -2919,6 +2919,46 @@ namespace OpenSim.Region.PhysicsModule.ODE
}
}
// does all pending changes generated during region load process
public override void ProcessPreSimulation()
{
lock (OdeLock)
{
if (world == IntPtr.Zero)
{
_taintedPrims.Clear();;
return;
}
int donechanges = 0;
if (_taintedPrims.Count > 0)
{
m_log.InfoFormat("[Ode] start processing pending actor operations");
int tstart = Util.EnvironmentTickCount();
lock (_taintedPrims)
{
foreach (OdePrim prim in _taintedPrims)
{
if (prim.m_taintremove)
RemovePrimThreadLocked(prim);
else
prim.ProcessTaints();
prim.m_collisionscore = 0;
donechanges++;
}
_taintedPrims.Clear();
}
int time = Util.EnvironmentTickCountSubtract(tstart);
m_log.InfoFormat("[Ode] finished {0} operations in {1}ms", donechanges, time);
}
m_log.InfoFormat("[Ode] {0} prim actors loaded",_prims.Count);
}
}
/// <summary>
/// This is our main simulate loop
/// </summary>