aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-03-27 20:41:35 +0000
committerJustin Clarke Casey2009-03-27 20:41:35 +0000
commit30ffefb67bf3d74b6355113bc121437d0bdbba14 (patch)
tree9255ee55a832e759f83da36e021fac69ce4adc88 /OpenSim
parentMoved a method GetDefaultVisualParameters from Scene to AvatarAppearance, whe... (diff)
downloadopensim-SC_OLD-30ffefb67bf3d74b6355113bc121437d0bdbba14.zip
opensim-SC_OLD-30ffefb67bf3d74b6355113bc121437d0bdbba14.tar.gz
opensim-SC_OLD-30ffefb67bf3d74b6355113bc121437d0bdbba14.tar.bz2
opensim-SC_OLD-30ffefb67bf3d74b6355113bc121437d0bdbba14.tar.xz
* refactor: call some EventManager triggers directly rather than through scene
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs7
3 files changed, 10 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1891f9d..2687422 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -534,7 +534,6 @@ namespace OpenSim.Region.Framework.Scenes
534 return found; 534 return found;
535 } 535 }
536 536
537
538 // Alias IncomingHelloNeighbour OtherRegionUp, for now 537 // Alias IncomingHelloNeighbour OtherRegionUp, for now
539 public bool IncomingHelloNeighbour(RegionInfo neighbour) 538 public bool IncomingHelloNeighbour(RegionInfo neighbour)
540 { 539 {
@@ -3065,21 +3064,6 @@ namespace OpenSim.Region.Framework.Scenes
3065 scriptEngine.InitializeEngine(this); 3064 scriptEngine.InitializeEngine(this);
3066 } 3065 }
3067 3066
3068 public void TriggerObjectChanged(uint localID, uint change)
3069 {
3070 m_eventManager.TriggerOnScriptChangedEvent(localID, change);
3071 }
3072
3073 public void TriggerAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 currentpos)
3074 {
3075 m_eventManager.TriggerAtTargetEvent(localID, handle, targetpos, currentpos);
3076 }
3077
3078 public void TriggerNotAtTargetEvent(uint localID)
3079 {
3080 m_eventManager.TriggerNotAtTargetEvent(localID);
3081 }
3082
3083 private bool ScriptDanger(SceneObjectPart part,Vector3 pos) 3067 private bool ScriptDanger(SceneObjectPart part,Vector3 pos)
3084 { 3068 {
3085 ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y); 3069 ILandObject parcel = LandChannel.GetLandObject(pos.X, pos.Y);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 968f94b..1834215 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2939,6 +2939,7 @@ namespace OpenSim.Region.Framework.Scenes
2939 } 2939 }
2940 } 2940 }
2941 } 2941 }
2942
2942 if (atTargets.Count > 0) 2943 if (atTargets.Count > 0)
2943 { 2944 {
2944 uint[] localids = new uint[0]; 2945 uint[] localids = new uint[0];
@@ -2952,16 +2953,20 @@ namespace OpenSim.Region.Framework.Scenes
2952 cntr++; 2953 cntr++;
2953 } 2954 }
2954 } 2955 }
2956
2955 for (int ctr = 0; ctr < localids.Length; ctr++) 2957 for (int ctr = 0; ctr < localids.Length; ctr++)
2956 { 2958 {
2957 foreach (uint target in atTargets.Keys) 2959 foreach (uint target in atTargets.Keys)
2958 { 2960 {
2959 scriptPosTarget att = atTargets[target]; 2961 scriptPosTarget att = atTargets[target];
2960 m_scene.TriggerAtTargetEvent(localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition); 2962 m_scene.EventManager.TriggerAtTargetEvent(
2963 localids[ctr], att.handle, att.targetPos, m_rootPart.GroupPosition);
2961 } 2964 }
2962 } 2965 }
2966
2963 return; 2967 return;
2964 } 2968 }
2969
2965 if (m_scriptListens_notAtTarget && !at_target) 2970 if (m_scriptListens_notAtTarget && !at_target)
2966 { 2971 {
2967 //trigger not_at_target 2972 //trigger not_at_target
@@ -2976,9 +2981,10 @@ namespace OpenSim.Region.Framework.Scenes
2976 cntr++; 2981 cntr++;
2977 } 2982 }
2978 } 2983 }
2984
2979 for (int ctr = 0; ctr < localids.Length; ctr++) 2985 for (int ctr = 0; ctr < localids.Length; ctr++)
2980 { 2986 {
2981 m_scene.TriggerNotAtTargetEvent(localids[ctr]); 2987 m_scene.EventManager.TriggerNotAtTargetEvent(localids[ctr]);
2982 } 2988 }
2983 } 2989 }
2984 } 2990 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index f178550..d30a45f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3101,11 +3101,8 @@ if (m_shape != null) {
3101 3101
3102 public void TriggerScriptChangedEvent(Changed val) 3102 public void TriggerScriptChangedEvent(Changed val)
3103 { 3103 {
3104 if (m_parentGroup != null) 3104 if (m_parentGroup != null && m_parentGroup.Scene != null)
3105 { 3105 m_parentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val);
3106 if (m_parentGroup.Scene != null)
3107 m_parentGroup.Scene.TriggerObjectChanged(LocalId, (uint)val);
3108 }
3109 } 3106 }
3110 3107
3111 public void TrimPermissions() 3108 public void TrimPermissions()