aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-11-22 22:13:57 +0000
committerJustin Clark-Casey (justincc)2011-11-22 22:13:57 +0000
commitb0fe0464af9a11dda184d3613eca734cd8c9f21e (patch)
tree27a8a50451c139f954d86d4348ca6e10a552c34e /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentslightly simplify OdeScene.Simulate() by removing bool processtaints, since w... (diff)
downloadopensim-SC_OLD-b0fe0464af9a11dda184d3613eca734cd8c9f21e.zip
opensim-SC_OLD-b0fe0464af9a11dda184d3613eca734cd8c9f21e.tar.gz
opensim-SC_OLD-b0fe0464af9a11dda184d3613eca734cd8c9f21e.tar.bz2
opensim-SC_OLD-b0fe0464af9a11dda184d3613eca734cd8c9f21e.tar.xz
Stop an exception being thrown and a teleport/border cross failing if the desintation sim has no active script engines.
This involves getting IScene.RequestModuleInterfaces() to return an empty array (as was stated in the method doc) rather than an array containing one null entry. Callers adjusted to stop checking for the list reference being null (which never happened anyway)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 7d901c9..c2d3501 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3525,23 +3525,23 @@ namespace OpenSim.Region.Framework.Scenes
3525 /// <param name="args">The arguments for the event</param> 3525 /// <param name="args">The arguments for the event</param>
3526 public void SendScriptEventToAttachments(string eventName, Object[] args) 3526 public void SendScriptEventToAttachments(string eventName, Object[] args)
3527 { 3527 {
3528 if (m_scriptEngines != null) 3528 if (m_scriptEngines.Length == 0)
3529 return;
3530
3531 lock (m_attachments)
3529 { 3532 {
3530 lock (m_attachments) 3533 foreach (SceneObjectGroup grp in m_attachments)
3531 { 3534 {
3532 foreach (SceneObjectGroup grp in m_attachments) 3535 // 16384 is CHANGED_ANIMATION
3536 //
3537 // Send this to all attachment root prims
3538 //
3539 foreach (IScriptModule m in m_scriptEngines)
3533 { 3540 {
3534 // 16384 is CHANGED_ANIMATION 3541 if (m == null) // No script engine loaded
3535 // 3542 continue;
3536 // Send this to all attachment root prims
3537 //
3538 foreach (IScriptModule m in m_scriptEngines)
3539 {
3540 if (m == null) // No script engine loaded
3541 continue;
3542 3543
3543 m.PostObjectEvent(grp.RootPart.UUID, "changed", new Object[] { (int)Changed.ANIMATION }); 3544 m.PostObjectEvent(grp.RootPart.UUID, "changed", new Object[] { (int)Changed.ANIMATION });
3544 }
3545 } 3545 }
3546 } 3546 }
3547 } 3547 }