aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs25
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
2 files changed, 33 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index e88a623..7688cf8 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -53,6 +53,10 @@ namespace OpenSim.Region.Framework.Scenes
53 53
54 public event ClientMovement OnClientMovement; 54 public event ClientMovement OnClientMovement;
55 55
56 public delegate void OnTerrainTaintedDelegate();
57
58 public event OnTerrainTaintedDelegate OnTerrainTainted;
59
56 public delegate void OnTerrainTickDelegate(); 60 public delegate void OnTerrainTickDelegate();
57 61
58 public delegate void OnTerrainUpdateDelegate(); 62 public delegate void OnTerrainUpdateDelegate();
@@ -938,6 +942,27 @@ namespace OpenSim.Region.Framework.Scenes
938 } 942 }
939 } 943 }
940 944
945 public void TriggerTerrainTainted()
946 {
947 OnTerrainTaintedDelegate handlerTerrainTainted = OnTerrainTainted;
948 if (handlerTerrainTainted != null)
949 {
950 foreach (OnTerrainTickDelegate d in handlerTerrainTainted.GetInvocationList())
951 {
952 try
953 {
954 d();
955 }
956 catch (Exception e)
957 {
958 m_log.ErrorFormat(
959 "[EVENT MANAGER]: Delegate for TriggerTerrainTainted failed - continuing. {0} {1}",
960 e.Message, e.StackTrace);
961 }
962 }
963 }
964 }
965
941 public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) 966 public void TriggerParcelPrimCountAdd(SceneObjectGroup obj)
942 { 967 {
943 OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd; 968 OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index ff2c46f..89cde05 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1403,6 +1403,14 @@ namespace OpenSim.Region.Framework.Scenes
1403 1403
1404 try 1404 try
1405 { 1405 {
1406 // Apply taints in terrain module to terrain in physics scene
1407 if (Frame % m_update_terrain == 0)
1408 {
1409 terMS = Util.EnvironmentTickCount();
1410 UpdateTerrain();
1411 terrainMS = Util.EnvironmentTickCountSubtract(terMS);
1412 }
1413
1406 tmpPhysicsMS2 = Util.EnvironmentTickCount(); 1414 tmpPhysicsMS2 = Util.EnvironmentTickCount();
1407 if ((Frame % m_update_physics == 0) && m_physics_enabled) 1415 if ((Frame % m_update_physics == 0) && m_physics_enabled)
1408 m_sceneGraph.UpdatePreparePhysics(); 1416 m_sceneGraph.UpdatePreparePhysics();
@@ -1467,13 +1475,6 @@ namespace OpenSim.Region.Framework.Scenes
1467 backupMS = Util.EnvironmentTickCountSubtract(backMS); 1475 backupMS = Util.EnvironmentTickCountSubtract(backMS);
1468 } 1476 }
1469 1477
1470 if (Frame % m_update_terrain == 0)
1471 {
1472 terMS = Util.EnvironmentTickCount();
1473 UpdateTerrain();
1474 terrainMS = Util.EnvironmentTickCountSubtract(terMS);
1475 }
1476
1477 //if (Frame % m_update_land == 0) 1478 //if (Frame % m_update_land == 0)
1478 //{ 1479 //{
1479 // int ldMS = Util.EnvironmentTickCount(); 1480 // int ldMS = Util.EnvironmentTickCount();