Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
abc029d1f4
|
@ -722,6 +722,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
|
||||||
}
|
}
|
||||||
if (shouldTaint)
|
if (shouldTaint)
|
||||||
{
|
{
|
||||||
|
m_scene.EventManager.TriggerTerrainTainted();
|
||||||
m_tainted = true;
|
m_tainted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public event ClientMovement OnClientMovement;
|
public event ClientMovement OnClientMovement;
|
||||||
|
|
||||||
|
public delegate void OnTerrainTaintedDelegate();
|
||||||
|
|
||||||
|
public event OnTerrainTaintedDelegate OnTerrainTainted;
|
||||||
|
|
||||||
public delegate void OnTerrainTickDelegate();
|
public delegate void OnTerrainTickDelegate();
|
||||||
|
|
||||||
public event OnTerrainTickDelegate OnTerrainTick;
|
public event OnTerrainTickDelegate OnTerrainTick;
|
||||||
|
@ -914,6 +918,27 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TriggerTerrainTainted()
|
||||||
|
{
|
||||||
|
OnTerrainTaintedDelegate handlerTerrainTainted = OnTerrainTainted;
|
||||||
|
if (handlerTerrainTainted != null)
|
||||||
|
{
|
||||||
|
foreach (OnTerrainTickDelegate d in handlerTerrainTainted.GetInvocationList())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
d();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[EVENT MANAGER]: Delegate for TriggerTerrainTainted failed - continuing. {0} {1}",
|
||||||
|
e.Message, e.StackTrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
|
public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
|
||||||
{
|
{
|
||||||
OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd;
|
OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd;
|
||||||
|
|
|
@ -1353,6 +1353,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
try
|
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();
|
tmpPhysicsMS2 = Util.EnvironmentTickCount();
|
||||||
if ((Frame % m_update_physics == 0) && m_physics_enabled)
|
if ((Frame % m_update_physics == 0) && m_physics_enabled)
|
||||||
m_sceneGraph.UpdatePreparePhysics();
|
m_sceneGraph.UpdatePreparePhysics();
|
||||||
|
@ -1417,13 +1425,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
backupMS = Util.EnvironmentTickCountSubtract(backMS);
|
backupMS = Util.EnvironmentTickCountSubtract(backMS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Frame % m_update_terrain == 0)
|
|
||||||
{
|
|
||||||
terMS = Util.EnvironmentTickCount();
|
|
||||||
UpdateTerrain();
|
|
||||||
terrainMS = Util.EnvironmentTickCountSubtract(terMS);
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (Frame % m_update_land == 0)
|
//if (Frame % m_update_land == 0)
|
||||||
//{
|
//{
|
||||||
// int ldMS = Util.EnvironmentTickCount();
|
// int ldMS = Util.EnvironmentTickCount();
|
||||||
|
|
Loading…
Reference in New Issue