aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 42d61a7..586f926 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -89,6 +89,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
89 private long m_eventDelayTicks = 0; 89 private long m_eventDelayTicks = 0;
90 private long m_nextEventTimeTicks = 0; 90 private long m_nextEventTimeTicks = 0;
91 private bool m_startOnInit = true; 91 private bool m_startOnInit = true;
92 private bool m_isAttachment = false;
93 private UUID m_attachedAvatar = UUID.Zero;
92 private StateSource m_stateSource; 94 private StateSource m_stateSource;
93 private bool m_postOnRez; 95 private bool m_postOnRez;
94 private bool m_startedFromSavedState = false; 96 private bool m_startedFromSavedState = false;
@@ -232,6 +234,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
232 m_MaxScriptQueue = maxScriptQueue; 234 m_MaxScriptQueue = maxScriptQueue;
233 m_stateSource = stateSource; 235 m_stateSource = stateSource;
234 m_postOnRez = postOnRez; 236 m_postOnRez = postOnRez;
237 m_isAttachment = part.IsAttachment;
238 m_attachedAvatar = part.AttachedAvatar;
235 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID; 239 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID;
236 240
237 if (part != null) 241 if (part != null)
@@ -379,6 +383,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
379 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0])); 383 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0]));
380 } 384 }
381 385
386 if (m_isAttachment)
387 {
388 PostEvent(new EventParams("attach",
389 new object[] { new LSL_Types.LSLString(m_attachedAvatar.ToString()) }, new DetectParams[0]));
390 }
391
382 if (m_stateSource == StateSource.NewRez) 392 if (m_stateSource == StateSource.NewRez)
383 { 393 {
384// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script"); 394// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script");
@@ -403,6 +413,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
403 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0])); 413 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0]));
404 } 414 }
405 415
416 if (m_isAttachment)
417 {
418 PostEvent(new EventParams("attach",
419 new object[] { new LSL_Types.LSLString(m_attachedAvatar.ToString()) }, new DetectParams[0]));
420 }
421
406 } 422 }
407 } 423 }
408 424