aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs150
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs29
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs24
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs6
8 files changed, 190 insertions, 44 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index 61e4934..57794f9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -137,7 +137,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
137 if (cmdHandlerThread == null) 137 if (cmdHandlerThread == null)
138 { 138 {
139 // Start the thread that will be doing the work 139 // Start the thread that will be doing the work
140 cmdHandlerThread = Watchdog.StartThread(CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true); 140 cmdHandlerThread
141 = Watchdog.StartThread(
142 CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true);
141 } 143 }
142 } 144 }
143 145
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5c02d98..4366626 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4450,7 +4450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4450 Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), 4450 Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f),
4451 Util.Clip((float)color.y, 0.0f, 1.0f), 4451 Util.Clip((float)color.y, 0.0f, 1.0f),
4452 Util.Clip((float)color.z, 0.0f, 1.0f)); 4452 Util.Clip((float)color.z, 0.0f, 1.0f));
4453 m_host.SetText(text.Length > 254 ? text.Remove(255) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); 4453 m_host.SetText(text.Length > 254 ? text.Remove(254) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
4454 //m_host.ParentGroup.HasGroupChanged = true; 4454 //m_host.ParentGroup.HasGroupChanged = true;
4455 //m_host.ParentGroup.ScheduleGroupForFullUpdate(); 4455 //m_host.ParentGroup.ScheduleGroupForFullUpdate();
4456 } 4456 }
@@ -6856,16 +6856,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6856 } 6856 }
6857 } 6857 }
6858 6858
6859 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) 6859 protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot)
6860 { 6860 {
6861 m_host.AddScriptLPS(1);
6862 // LSL quaternions can normalize to 0, normal Quaternions can't. 6861 // LSL quaternions can normalize to 0, normal Quaternions can't.
6863 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) 6862 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
6864 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 6863 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
6865 6864
6866 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); 6865 part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
6867 m_host.SitTargetOrientation = Rot2Quaternion(rot); 6866 part.SitTargetOrientation = Rot2Quaternion(rot);
6868 m_host.ParentGroup.HasGroupChanged = true; 6867 part.ParentGroup.HasGroupChanged = true;
6868 }
6869
6870 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
6871 {
6872 m_host.AddScriptLPS(1);
6873 SitTarget(m_host, offset, rot);
6874 }
6875
6876 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
6877 {
6878 m_host.AddScriptLPS(1);
6879 if (link == ScriptBaseClass.LINK_ROOT)
6880 SitTarget(m_host.ParentGroup.RootPart, offset, rot);
6881 else if (link == ScriptBaseClass.LINK_THIS)
6882 SitTarget(m_host, offset, rot);
6883 else
6884 {
6885 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
6886 if (null != part)
6887 {
6888 SitTarget(part, offset, rot);
6889 }
6890 }
6869 } 6891 }
6870 6892
6871 public LSL_String llAvatarOnSitTarget() 6893 public LSL_String llAvatarOnSitTarget()
@@ -7550,10 +7572,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7550 shapeBlock.PathScaleX = 100; 7572 shapeBlock.PathScaleX = 100;
7551 shapeBlock.PathScaleY = 150; 7573 shapeBlock.PathScaleY = 150;
7552 7574
7553 if ((type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER) == 0 && 7575 int flag = type & (ScriptBaseClass.PRIM_SCULPT_FLAG_INVERT | ScriptBaseClass.PRIM_SCULPT_FLAG_MIRROR);
7554 (type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE) == 0 && 7576
7555 (type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE) == 0 && 7577 if (type != (ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER | flag) &&
7556 (type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS) == 0) 7578 type != (ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE | flag) &&
7579 type != (ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE | flag) &&
7580 type != (ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS | flag))
7557 { 7581 {
7558 // default 7582 // default
7559 type = type | (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE; 7583 type = type | (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
@@ -8841,23 +8865,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8841 { 8865 {
8842 m_host.AddScriptLPS(1); 8866 m_host.AddScriptLPS(1);
8843 ScriptSleep(1000); 8867 ScriptSleep(1000);
8868 return GetPrimMediaParams(m_host, face, rules);
8869 }
8844 8870
8871 public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
8872 {
8873 m_host.AddScriptLPS(1);
8874 ScriptSleep(1000);
8875 if (link == ScriptBaseClass.LINK_ROOT)
8876 return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
8877 else if (link == ScriptBaseClass.LINK_THIS)
8878 return GetPrimMediaParams(m_host, face, rules);
8879 else
8880 {
8881 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
8882 if (null != part)
8883 return GetPrimMediaParams(part, face, rules);
8884 }
8885
8886 return new LSL_List();
8887 }
8888
8889 private LSL_List GetPrimMediaParams(SceneObjectPart part, int face, LSL_List rules)
8890 {
8845 // LSL Spec http://wiki.secondlife.com/wiki/LlGetPrimMediaParams says to fail silently if face is invalid 8891 // LSL Spec http://wiki.secondlife.com/wiki/LlGetPrimMediaParams says to fail silently if face is invalid
8846 // TODO: Need to correctly handle case where a face has no media (which gives back an empty list). 8892 // TODO: Need to correctly handle case where a face has no media (which gives back an empty list).
8847 // Assuming silently fail means give back an empty list. Ideally, need to check this. 8893 // Assuming silently fail means give back an empty list. Ideally, need to check this.
8848 if (face < 0 || face > m_host.GetNumberOfSides() - 1) 8894 if (face < 0 || face > part.GetNumberOfSides() - 1)
8849 return new LSL_List(); 8895 return new LSL_List();
8850 8896
8851 return GetPrimMediaParams(face, rules);
8852 }
8853
8854 private LSL_List GetPrimMediaParams(int face, LSL_List rules)
8855 {
8856 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); 8897 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
8857 if (null == module) 8898 if (null == module)
8858 throw new Exception("Media on a prim functions not available"); 8899 return new LSL_List();
8859 8900
8860 MediaEntry me = module.GetMediaEntry(m_host, face); 8901 MediaEntry me = module.GetMediaEntry(part, face);
8861 8902
8862 // As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams 8903 // As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams
8863 if (null == me) 8904 if (null == me)
@@ -8939,33 +8980,52 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8939 case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL: 8980 case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
8940 res.Add(new LSL_Integer((int)me.ControlPermissions)); 8981 res.Add(new LSL_Integer((int)me.ControlPermissions));
8941 break; 8982 break;
8983
8984 default: return ScriptBaseClass.LSL_STATUS_MALFORMED_PARAMS;
8942 } 8985 }
8943 } 8986 }
8944 8987
8945 return res; 8988 return res;
8946 } 8989 }
8947 8990
8948 public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules) 8991 public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules)
8949 { 8992 {
8950 m_host.AddScriptLPS(1); 8993 m_host.AddScriptLPS(1);
8951 ScriptSleep(1000); 8994 ScriptSleep(1000);
8995 return SetPrimMediaParams(m_host, face, rules);
8996 }
8952 8997
8953 // LSL Spec http://wiki.secondlife.com/wiki/LlSetPrimMediaParams says to fail silently if face is invalid 8998 public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
8954 // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this. 8999 {
8955 // Don't perform the media check directly 9000 m_host.AddScriptLPS(1);
8956 if (face < 0 || face > m_host.GetNumberOfSides() - 1) 9001 ScriptSleep(1000);
8957 return ScriptBaseClass.LSL_STATUS_OK; 9002 if (link == ScriptBaseClass.LINK_ROOT)
9003 return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
9004 else if (link == ScriptBaseClass.LINK_THIS)
9005 return SetPrimMediaParams(m_host, face, rules);
9006 else
9007 {
9008 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
9009 if (null != part)
9010 return SetPrimMediaParams(part, face, rules);
9011 }
8958 9012
8959 return SetPrimMediaParams(face, rules); 9013 return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
8960 } 9014 }
8961 9015
8962 private LSL_Integer SetPrimMediaParams(int face, LSL_List rules) 9016 private LSL_Integer SetPrimMediaParams(SceneObjectPart part, LSL_Integer face, LSL_List rules)
8963 { 9017 {
9018 // LSL Spec http://wiki.secondlife.com/wiki/LlSetPrimMediaParams says to fail silently if face is invalid
9019 // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
9020 // Don't perform the media check directly
9021 if (face < 0 || face > part.GetNumberOfSides() - 1)
9022 return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
9023
8964 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); 9024 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
8965 if (null == module) 9025 if (null == module)
8966 throw new Exception("Media on a prim functions not available"); 9026 return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED;
8967 9027
8968 MediaEntry me = module.GetMediaEntry(m_host, face); 9028 MediaEntry me = module.GetMediaEntry(part, face);
8969 if (null == me) 9029 if (null == me)
8970 me = new MediaEntry(); 9030 me = new MediaEntry();
8971 9031
@@ -9044,10 +9104,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9044 case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL: 9104 case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
9045 me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); 9105 me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
9046 break; 9106 break;
9107
9108 default: return ScriptBaseClass.LSL_STATUS_MALFORMED_PARAMS;
9047 } 9109 }
9048 } 9110 }
9049 9111
9050 module.SetMediaEntry(m_host, face, me); 9112 module.SetMediaEntry(part, face, me);
9051 9113
9052 return ScriptBaseClass.LSL_STATUS_OK; 9114 return ScriptBaseClass.LSL_STATUS_OK;
9053 } 9115 }
@@ -9056,18 +9118,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9056 { 9118 {
9057 m_host.AddScriptLPS(1); 9119 m_host.AddScriptLPS(1);
9058 ScriptSleep(1000); 9120 ScriptSleep(1000);
9121 return ClearPrimMedia(m_host, face);
9122 }
9059 9123
9124 public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face)
9125 {
9126 m_host.AddScriptLPS(1);
9127 ScriptSleep(1000);
9128 if (link == ScriptBaseClass.LINK_ROOT)
9129 return ClearPrimMedia(m_host.ParentGroup.RootPart, face);
9130 else if (link == ScriptBaseClass.LINK_THIS)
9131 return ClearPrimMedia(m_host, face);
9132 else
9133 {
9134 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
9135 if (null != part)
9136 return ClearPrimMedia(part, face);
9137 }
9138
9139 return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
9140 }
9141
9142 private LSL_Integer ClearPrimMedia(SceneObjectPart part, LSL_Integer face)
9143 {
9060 // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid 9144 // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
9061 // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this. 9145 // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
9062 // FIXME: Don't perform the media check directly 9146 // FIXME: Don't perform the media check directly
9063 if (face < 0 || face > m_host.GetNumberOfSides() - 1) 9147 if (face < 0 || face > part.GetNumberOfSides() - 1)
9064 return ScriptBaseClass.LSL_STATUS_OK; 9148 return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
9065 9149
9066 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); 9150 IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
9067 if (null == module) 9151 if (null == module)
9068 throw new Exception("Media on a prim functions not available"); 9152 return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED;
9069 9153
9070 module.ClearMediaEntry(m_host, face); 9154 module.ClearMediaEntry(part, face);
9071 9155
9072 return ScriptBaseClass.LSL_STATUS_OK; 9156 return ScriptBaseClass.LSL_STATUS_OK;
9073 } 9157 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 2424130..44fd980 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2169,6 +2169,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2169 return result; 2169 return result;
2170 } 2170 }
2171 2171
2172 public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
2173 {
2174 CheckThreatLevel(ThreatLevel.High, "osReplaceString");
2175 m_host.AddScriptLPS(1);
2176
2177 // Normalize indices (if negative).
2178 // After normlaization they may still be
2179 // negative, but that is now relative to
2180 // the start, rather than the end, of the
2181 // sequence.
2182 if (start < 0)
2183 {
2184 start = src.Length + start;
2185 }
2186
2187 if (start < 0 || start >= src.Length)
2188 {
2189 return src;
2190 }
2191
2192 // Find matches beginning at start position
2193 Regex matcher = new Regex(pattern);
2194 return matcher.Replace(src,replace,count,start);
2195 }
2196
2172 public string osLoadedCreationDate() 2197 public string osLoadedCreationDate()
2173 { 2198 {
2174 CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); 2199 CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate");
@@ -2779,7 +2804,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2779 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 2804 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
2780 m_host.AddScriptLPS(1); 2805 m_host.AddScriptLPS(1);
2781 ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); 2806 ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
2782 avatar.SpeedModifier = (float)SpeedModifier; 2807
2808 if (avatar != null)
2809 avatar.SpeedModifier = (float)SpeedModifier;
2783 } 2810 }
2784 2811
2785 public void osKickAvatar(string FirstName,string SurName,string alert) 2812 public void osKickAvatar(string FirstName,string SurName,string alert)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 83da204..e25255c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -157,12 +157,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
157 157
158 public void CheckSenseRepeaterEvents() 158 public void CheckSenseRepeaterEvents()
159 { 159 {
160 // Nothing to do here?
161 if (SenseRepeaters.Count == 0)
162 return;
163
164 lock (SenseRepeatListLock) 160 lock (SenseRepeatListLock)
165 { 161 {
162 // Nothing to do here?
163 if (SenseRepeaters.Count == 0)
164 return;
165
166 // Go through all timers 166 // Go through all timers
167 foreach (SenseRepeatClass ts in SenseRepeaters) 167 foreach (SenseRepeatClass ts in SenseRepeaters)
168 { 168 {
@@ -640,7 +640,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
640 ts.next = 640 ts.next =
641 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); 641 DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
642 642
643 SenseRepeaters.Add(ts); 643 lock (SenseRepeatListLock)
644 SenseRepeaters.Add(ts);
645
644 idx += 6; 646 idx += 6;
645 } 647 }
646 } 648 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 5b8c316..8d97a7c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
64 LSL_List llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options); 64 LSL_List llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options);
65 LSL_Integer llCeil(double f); 65 LSL_Integer llCeil(double f);
66 void llClearCameraParams(); 66 void llClearCameraParams();
67 LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face);
67 LSL_Integer llClearPrimMedia(LSL_Integer face); 68 LSL_Integer llClearPrimMedia(LSL_Integer face);
68 void llCloseRemoteDataChannel(string channel); 69 void llCloseRemoteDataChannel(string channel);
69 LSL_Float llCloud(LSL_Vector offset); 70 LSL_Float llCloud(LSL_Vector offset);
@@ -140,7 +141,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
140 LSL_String llGetLinkName(int linknum); 141 LSL_String llGetLinkName(int linknum);
141 LSL_Integer llGetLinkNumber(); 142 LSL_Integer llGetLinkNumber();
142 LSL_Integer llGetLinkNumberOfSides(int link); 143 LSL_Integer llGetLinkNumberOfSides(int link);
143 LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules); 144 LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules);
145 LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules);
144 LSL_Integer llGetListEntryType(LSL_List src, int index); 146 LSL_Integer llGetListEntryType(LSL_List src, int index);
145 LSL_Integer llGetListLength(LSL_List src); 147 LSL_Integer llGetListLength(LSL_List src);
146 LSL_Vector llGetLocalPos(); 148 LSL_Vector llGetLocalPos();
@@ -220,6 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
220 LSL_String llGetDisplayName(string id); 222 LSL_String llGetDisplayName(string id);
221 LSL_String llRequestDisplayName(string id); 223 LSL_String llRequestDisplayName(string id);
222 void llLinkParticleSystem(int linknum, LSL_List rules); 224 void llLinkParticleSystem(int linknum, LSL_List rules);
225 void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot);
223 LSL_String llList2CSV(LSL_List src); 226 LSL_String llList2CSV(LSL_List src);
224 LSL_Float llList2Float(LSL_List src, int index); 227 LSL_Float llList2Float(LSL_List src, int index);
225 LSL_Integer llList2Integer(LSL_List src, int index); 228 LSL_Integer llList2Integer(LSL_List src, int index);
@@ -336,6 +339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
336 void llSetInventoryPermMask(string item, int mask, int value); 339 void llSetInventoryPermMask(string item, int mask, int value);
337 void llSetLinkAlpha(int linknumber, double alpha, int face); 340 void llSetLinkAlpha(int linknumber, double alpha, int face);
338 void llSetLinkColor(int linknumber, LSL_Vector color, int face); 341 void llSetLinkColor(int linknumber, LSL_Vector color, int face);
342 LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules);
339 void llSetLinkPrimitiveParams(int linknumber, LSL_List rules); 343 void llSetLinkPrimitiveParams(int linknumber, LSL_List rules);
340 void llSetLinkTexture(int linknumber, string texture, int face); 344 void llSetLinkTexture(int linknumber, string texture, int face);
341 void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate); 345 void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate);
@@ -347,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
347 void llSetPayPrice(int price, LSL_List quick_pay_buttons); 351 void llSetPayPrice(int price, LSL_List quick_pay_buttons);
348 void llSetPos(LSL_Vector pos); 352 void llSetPos(LSL_Vector pos);
349 LSL_Integer llSetRegionPos(LSL_Vector pos); 353 LSL_Integer llSetRegionPos(LSL_Vector pos);
350 LSL_Integer llSetPrimMediaParams(int face, LSL_List rules); 354 LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules);
351 void llSetPrimitiveParams(LSL_List rules); 355 void llSetPrimitiveParams(LSL_List rules);
352 void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules); 356 void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules);
353 void llSetPrimURL(string url); 357 void llSetPrimURL(string url);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index ca24051..fb52600 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -165,6 +165,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
165 165
166 LSL_String osFormatString(string str, LSL_List strings); 166 LSL_String osFormatString(string str, LSL_List strings);
167 LSL_List osMatchString(string src, string pattern, int start); 167 LSL_List osMatchString(string src, string pattern, int start);
168 LSL_String osReplaceString(string src, string pattern, string replace, int count, int start);
168 169
169 // Information about data loaded into the region 170 // Information about data loaded into the region
170 string osLoadedCreationDate(); 171 string osLoadedCreationDate();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 1366141..a8d1ddb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1710,6 +1710,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1710 m_LSL_Functions.llSitTarget(offset, rot); 1710 m_LSL_Functions.llSitTarget(offset, rot);
1711 } 1711 }
1712 1712
1713 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
1714 {
1715 m_LSL_Functions.llLinkSitTarget(link, offset, rot);
1716 }
1717
1713 public void llSleep(double sec) 1718 public void llSleep(double sec)
1714 { 1719 {
1715 m_LSL_Functions.llSleep(sec); 1720 m_LSL_Functions.llSleep(sec);
@@ -1909,17 +1914,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1909 { 1914 {
1910 return m_LSL_Functions.llGetPrimMediaParams(face, rules); 1915 return m_LSL_Functions.llGetPrimMediaParams(face, rules);
1911 } 1916 }
1912 1917
1918 public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
1919 {
1920 return m_LSL_Functions.llGetLinkMedia(link, face, rules);
1921 }
1922
1913 public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules) 1923 public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules)
1914 { 1924 {
1915 return m_LSL_Functions.llSetPrimMediaParams(face, rules); 1925 return m_LSL_Functions.llSetPrimMediaParams(face, rules);
1916 } 1926 }
1917 1927
1928 public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
1929 {
1930 return m_LSL_Functions.llSetLinkMedia(link, face, rules);
1931 }
1932
1918 public LSL_Integer llClearPrimMedia(LSL_Integer face) 1933 public LSL_Integer llClearPrimMedia(LSL_Integer face)
1919 { 1934 {
1920 return m_LSL_Functions.llClearPrimMedia(face); 1935 return m_LSL_Functions.llClearPrimMedia(face);
1921 } 1936 }
1922 1937
1938 public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face)
1939 {
1940 return m_LSL_Functions.llClearLinkMedia(link, face);
1941 }
1942
1923 public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link) 1943 public LSL_Integer llGetLinkNumberOfSides(LSL_Integer link)
1924 { 1944 {
1925 return m_LSL_Functions.llGetLinkNumberOfSides(link); 1945 return m_LSL_Functions.llGetLinkNumberOfSides(link);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index cc8d417..4341246 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -472,6 +472,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
472 return m_OSSL_Functions.osMatchString(src, pattern, start); 472 return m_OSSL_Functions.osMatchString(src, pattern, start);
473 } 473 }
474 474
475 public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
476 {
477 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
478 }
479
480
475 // Information about data loaded into the region 481 // Information about data loaded into the region
476 public string osLoadedCreationDate() 482 public string osLoadedCreationDate()
477 { 483 {