From 9d93668a0a83fb02595d8e94013eaf313ad82f8f Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 13 Aug 2008 14:19:59 +0000 Subject: mantis#1927. Thank you kindly, Leaf for a patch that: Makes progress on fixing scripts in child prims of attachments not being scheduled for execution. --- OpenSim/Region/Environment/Scenes/Scene.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index ef0a119..3b961a5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -3466,8 +3466,14 @@ namespace OpenSim.Region.Environment.Scenes SceneObjectPart part = GetSceneObjectPart(localID); if (part != null) { - LLVector3 pos = part.GetWorldPosition(); - return scriptDanger(part, pos); + // Changed so that child prims of attachments return scriptDanger for their parent, so that + // their scripts will actually run. + // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 + SceneObjectPart parent = part.ParentGroup.RootPart; + if( parent != null && parent.IsAttachment ) + return scriptDanger(parent, parent.GetWorldPosition() ); + else + return scriptDanger(part, part.GetWorldPosition() ); } else { -- cgit v1.1