diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 82a6b94034..62ad2cd15e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1406,6 +1406,9 @@ namespace OpenSim.Region.Environment.Scenes
group.ResetIDs();
AddEntity(group);
+ // Set the startup parameter for on_rez event and llGetStartParameter() function
+ group.StartParameter = param;
+
// we set it's position in world.
group.AbsolutePosition = pos;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 38447933b5..bc99aa4a81 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Xml;
+using System.Xml.Serialization;
using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
@@ -109,6 +110,7 @@ namespace OpenSim.Region.Environment.Scenes
private bool m_scriptListens_atTarget = false;
private bool m_scriptListens_notAtTarget = false;
+ private int m_startparameter = 0;
#region Properties
@@ -121,6 +123,16 @@ namespace OpenSim.Region.Environment.Scenes
///
protected bool m_isSelected = false;
+ ///
+ /// Set start parameter for on_rez event and llGetStartParameter()
+ ///
+ [XmlIgnore]
+ public int StartParameter
+ {
+ get { return m_startparameter; }
+ set { m_startparameter = value; }
+ }
+
///
///
///
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 61b577ecba..a0617885da 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -2202,8 +2202,8 @@ namespace OpenSim.Region.ScriptEngine.Common
public LSL_Types.LSLInteger llGetStartParameter()
{
m_host.AddScriptLPS(1);
- NotImplemented("llGetStartParameter");
- return 0;
+ // NotImplemented("llGetStartParameter");
+ return m_host.ParentGroup.StartParameter;
}
public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos)