diff options
author | Dan Lake | 2012-05-10 14:42:46 -0700 |
---|---|---|
committer | Dan Lake | 2012-05-10 14:42:46 -0700 |
commit | f374b63ac8a2f75b59b2c0442ab8000f76466f70 (patch) | |
tree | 783d321853ecd85d2dd6b2e8ee5aa83a9e8b0682 /OpenSim/Region/Framework/Scenes/EventManager.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-f374b63ac8a2f75b59b2c0442ab8000f76466f70.zip opensim-SC-f374b63ac8a2f75b59b2c0442ab8000f76466f70.tar.gz opensim-SC-f374b63ac8a2f75b59b2c0442ab8000f76466f70.tar.bz2 opensim-SC-f374b63ac8a2f75b59b2c0442ab8000f76466f70.tar.xz |
Add even for terrain tainting and synchronize terrain module with physics scene before physics simulation step rather than after
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/EventManager.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index ace8313..f97b0a9 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 event OnTerrainTickDelegate OnTerrainTick; | 62 | public event OnTerrainTickDelegate OnTerrainTick; |
@@ -914,6 +918,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
914 | } | 918 | } |
915 | } | 919 | } |
916 | 920 | ||
921 | public void TriggerTerrainTainted() | ||
922 | { | ||
923 | OnTerrainTaintedDelegate handlerTerrainTainted = OnTerrainTainted; | ||
924 | if (handlerTerrainTainted != null) | ||
925 | { | ||
926 | foreach (OnTerrainTickDelegate d in handlerTerrainTainted.GetInvocationList()) | ||
927 | { | ||
928 | try | ||
929 | { | ||
930 | d(); | ||
931 | } | ||
932 | catch (Exception e) | ||
933 | { | ||
934 | m_log.ErrorFormat( | ||
935 | "[EVENT MANAGER]: Delegate for TriggerTerrainTainted failed - continuing. {0} {1}", | ||
936 | e.Message, e.StackTrace); | ||
937 | } | ||
938 | } | ||
939 | } | ||
940 | } | ||
941 | |||
917 | public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) | 942 | public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) |
918 | { | 943 | { |
919 | OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd; | 944 | OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = OnParcelPrimCountAdd; |