Add even for terrain tainting and synchronize terrain module with physics scene before physics simulation step rather than after

This commit is contained in:
Dan Lake
2012-05-10 14:42:46 -07:00
parent 3bc5620d74
commit f374b63ac8
3 changed files with 34 additions and 7 deletions

View File

@@ -1353,6 +1353,14 @@ namespace OpenSim.Region.Framework.Scenes
try
{
// Apply taints in terrain module to terrain in physics scene
if (Frame % m_update_terrain == 0)
{
terMS = Util.EnvironmentTickCount();
UpdateTerrain();
terrainMS = Util.EnvironmentTickCountSubtract(terMS);
}
tmpPhysicsMS2 = Util.EnvironmentTickCount();
if ((Frame % m_update_physics == 0) && m_physics_enabled)
m_sceneGraph.UpdatePreparePhysics();
@@ -1417,13 +1425,6 @@ namespace OpenSim.Region.Framework.Scenes
backupMS = Util.EnvironmentTickCountSubtract(backMS);
}
if (Frame % m_update_terrain == 0)
{
terMS = Util.EnvironmentTickCount();
UpdateTerrain();
terrainMS = Util.EnvironmentTickCountSubtract(terMS);
}
//if (Frame % m_update_land == 0)
//{
// int ldMS = Util.EnvironmentTickCount();