From 39eb39c0d5a86ef2f4cb3375be86eb978b03d2e9 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Wed, 14 May 2008 05:43:21 +0000
Subject: Applied Patch mantis 1220. Implements llGetStartParameter. Thanks!
---
OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 3 +++
OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 12 ++++++++++++
OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 4 ++--
3 files changed, 17 insertions(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 82a6b94..62ad2cd 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 3844793..bc99aa4 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
@@ -122,6 +124,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; }
+ }
+
+ ///
///
///
public int PrimCount
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 61b577e..a061788 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)
--
cgit v1.1