diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
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 0cc8829..6d4072c 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 | } |
@@ -6866,16 +6866,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6866 | } | 6866 | } |
6867 | } | 6867 | } |
6868 | 6868 | ||
6869 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | 6869 | protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot) |
6870 | { | 6870 | { |
6871 | m_host.AddScriptLPS(1); | ||
6872 | // LSL quaternions can normalize to 0, normal Quaternions can't. | 6871 | // LSL quaternions can normalize to 0, normal Quaternions can't. |
6873 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) | 6872 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) |
6874 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 | 6873 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 |
6875 | 6874 | ||
6876 | m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); | 6875 | part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); |
6877 | m_host.SitTargetOrientation = Rot2Quaternion(rot); | 6876 | part.SitTargetOrientation = Rot2Quaternion(rot); |
6878 | m_host.ParentGroup.HasGroupChanged = true; | 6877 | part.ParentGroup.HasGroupChanged = true; |
6878 | } | ||
6879 | |||
6880 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | ||
6881 | { | ||
6882 | m_host.AddScriptLPS(1); | ||
6883 | SitTarget(m_host, offset, rot); | ||
6884 | } | ||
6885 | |||
6886 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) | ||
6887 | { | ||
6888 | m_host.AddScriptLPS(1); | ||
6889 | if (link == ScriptBaseClass.LINK_ROOT) | ||
6890 | SitTarget(m_host.ParentGroup.RootPart, offset, rot); | ||
6891 | else if (link == ScriptBaseClass.LINK_THIS) | ||
6892 | SitTarget(m_host, offset, rot); | ||
6893 | else | ||
6894 | { | ||
6895 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link); | ||
6896 | if (null != part) | ||
6897 | { | ||
6898 | SitTarget(part, offset, rot); | ||
6899 | } | ||
6900 | } | ||
6879 | } | 6901 | } |
6880 | 6902 | ||
6881 | public LSL_String llAvatarOnSitTarget() | 6903 | public LSL_String llAvatarOnSitTarget() |
@@ -7560,10 +7582,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7560 | shapeBlock.PathScaleX = 100; | 7582 | shapeBlock.PathScaleX = 100; |
7561 | shapeBlock.PathScaleY = 150; | 7583 | shapeBlock.PathScaleY = 150; |
7562 | 7584 | ||
7563 | if ((type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER) == 0 && | 7585 | int flag = type & (ScriptBaseClass.PRIM_SCULPT_FLAG_INVERT | ScriptBaseClass.PRIM_SCULPT_FLAG_MIRROR); |
7564 | (type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE) == 0 && | 7586 | |
7565 | (type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE) == 0 && | 7587 | if (type != (ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER | flag) && |
7566 | (type & (int)ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS) == 0) | 7588 | type != (ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE | flag) && |
7589 | type != (ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE | flag) && | ||
7590 | type != (ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS | flag)) | ||
7567 | { | 7591 | { |
7568 | // default | 7592 | // default |
7569 | type = type | (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE; | 7593 | type = type | (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE; |
@@ -8851,23 +8875,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8851 | { | 8875 | { |
8852 | m_host.AddScriptLPS(1); | 8876 | m_host.AddScriptLPS(1); |
8853 | ScriptSleep(1000); | 8877 | ScriptSleep(1000); |
8878 | return GetPrimMediaParams(m_host, face, rules); | ||
8879 | } | ||
8854 | 8880 | ||
8881 | public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) | ||
8882 | { | ||
8883 | m_host.AddScriptLPS(1); | ||
8884 | ScriptSleep(1000); | ||
8885 | if (link == ScriptBaseClass.LINK_ROOT) | ||
8886 | return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); | ||
8887 | else if (link == ScriptBaseClass.LINK_THIS) | ||
8888 | return GetPrimMediaParams(m_host, face, rules); | ||
8889 | else | ||
8890 | { | ||
8891 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link); | ||
8892 | if (null != part) | ||
8893 | return GetPrimMediaParams(part, face, rules); | ||
8894 | } | ||
8895 | |||
8896 | return new LSL_List(); | ||
8897 | } | ||
8898 | |||
8899 | private LSL_List GetPrimMediaParams(SceneObjectPart part, int face, LSL_List rules) | ||
8900 | { | ||
8855 | // LSL Spec http://wiki.secondlife.com/wiki/LlGetPrimMediaParams says to fail silently if face is invalid | 8901 | // LSL Spec http://wiki.secondlife.com/wiki/LlGetPrimMediaParams says to fail silently if face is invalid |
8856 | // TODO: Need to correctly handle case where a face has no media (which gives back an empty list). | 8902 | // TODO: Need to correctly handle case where a face has no media (which gives back an empty list). |
8857 | // Assuming silently fail means give back an empty list. Ideally, need to check this. | 8903 | // Assuming silently fail means give back an empty list. Ideally, need to check this. |
8858 | if (face < 0 || face > m_host.GetNumberOfSides() - 1) | 8904 | if (face < 0 || face > part.GetNumberOfSides() - 1) |
8859 | return new LSL_List(); | 8905 | return new LSL_List(); |
8860 | 8906 | ||
8861 | return GetPrimMediaParams(face, rules); | ||
8862 | } | ||
8863 | |||
8864 | private LSL_List GetPrimMediaParams(int face, LSL_List rules) | ||
8865 | { | ||
8866 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); | 8907 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); |
8867 | if (null == module) | 8908 | if (null == module) |
8868 | throw new Exception("Media on a prim functions not available"); | 8909 | return new LSL_List(); |
8869 | 8910 | ||
8870 | MediaEntry me = module.GetMediaEntry(m_host, face); | 8911 | MediaEntry me = module.GetMediaEntry(part, face); |
8871 | 8912 | ||
8872 | // As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams | 8913 | // As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams |
8873 | if (null == me) | 8914 | if (null == me) |
@@ -8949,33 +8990,52 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8949 | case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL: | 8990 | case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL: |
8950 | res.Add(new LSL_Integer((int)me.ControlPermissions)); | 8991 | res.Add(new LSL_Integer((int)me.ControlPermissions)); |
8951 | break; | 8992 | break; |
8993 | |||
8994 | default: return ScriptBaseClass.LSL_STATUS_MALFORMED_PARAMS; | ||
8952 | } | 8995 | } |
8953 | } | 8996 | } |
8954 | 8997 | ||
8955 | return res; | 8998 | return res; |
8956 | } | 8999 | } |
8957 | 9000 | ||
8958 | public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules) | 9001 | public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) |
8959 | { | 9002 | { |
8960 | m_host.AddScriptLPS(1); | 9003 | m_host.AddScriptLPS(1); |
8961 | ScriptSleep(1000); | 9004 | ScriptSleep(1000); |
9005 | return SetPrimMediaParams(m_host, face, rules); | ||
9006 | } | ||
8962 | 9007 | ||
8963 | // LSL Spec http://wiki.secondlife.com/wiki/LlSetPrimMediaParams says to fail silently if face is invalid | 9008 | public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) |
8964 | // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this. | 9009 | { |
8965 | // Don't perform the media check directly | 9010 | m_host.AddScriptLPS(1); |
8966 | if (face < 0 || face > m_host.GetNumberOfSides() - 1) | 9011 | ScriptSleep(1000); |
8967 | return ScriptBaseClass.LSL_STATUS_OK; | 9012 | if (link == ScriptBaseClass.LINK_ROOT) |
9013 | return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); | ||
9014 | else if (link == ScriptBaseClass.LINK_THIS) | ||
9015 | return SetPrimMediaParams(m_host, face, rules); | ||
9016 | else | ||
9017 | { | ||
9018 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link); | ||
9019 | if (null != part) | ||
9020 | return SetPrimMediaParams(part, face, rules); | ||
9021 | } | ||
8968 | 9022 | ||
8969 | return SetPrimMediaParams(face, rules); | 9023 | return ScriptBaseClass.LSL_STATUS_NOT_FOUND; |
8970 | } | 9024 | } |
8971 | 9025 | ||
8972 | private LSL_Integer SetPrimMediaParams(int face, LSL_List rules) | 9026 | private LSL_Integer SetPrimMediaParams(SceneObjectPart part, LSL_Integer face, LSL_List rules) |
8973 | { | 9027 | { |
9028 | // LSL Spec http://wiki.secondlife.com/wiki/LlSetPrimMediaParams says to fail silently if face is invalid | ||
9029 | // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this. | ||
9030 | // Don't perform the media check directly | ||
9031 | if (face < 0 || face > part.GetNumberOfSides() - 1) | ||
9032 | return ScriptBaseClass.LSL_STATUS_NOT_FOUND; | ||
9033 | |||
8974 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); | 9034 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); |
8975 | if (null == module) | 9035 | if (null == module) |
8976 | throw new Exception("Media on a prim functions not available"); | 9036 | return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED; |
8977 | 9037 | ||
8978 | MediaEntry me = module.GetMediaEntry(m_host, face); | 9038 | MediaEntry me = module.GetMediaEntry(part, face); |
8979 | if (null == me) | 9039 | if (null == me) |
8980 | me = new MediaEntry(); | 9040 | me = new MediaEntry(); |
8981 | 9041 | ||
@@ -9054,10 +9114,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9054 | case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL: | 9114 | case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL: |
9055 | me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); | 9115 | me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++); |
9056 | break; | 9116 | break; |
9117 | |||
9118 | default: return ScriptBaseClass.LSL_STATUS_MALFORMED_PARAMS; | ||
9057 | } | 9119 | } |
9058 | } | 9120 | } |
9059 | 9121 | ||
9060 | module.SetMediaEntry(m_host, face, me); | 9122 | module.SetMediaEntry(part, face, me); |
9061 | 9123 | ||
9062 | return ScriptBaseClass.LSL_STATUS_OK; | 9124 | return ScriptBaseClass.LSL_STATUS_OK; |
9063 | } | 9125 | } |
@@ -9066,18 +9128,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9066 | { | 9128 | { |
9067 | m_host.AddScriptLPS(1); | 9129 | m_host.AddScriptLPS(1); |
9068 | ScriptSleep(1000); | 9130 | ScriptSleep(1000); |
9131 | return ClearPrimMedia(m_host, face); | ||
9132 | } | ||
9069 | 9133 | ||
9134 | public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) | ||
9135 | { | ||
9136 | m_host.AddScriptLPS(1); | ||
9137 | ScriptSleep(1000); | ||
9138 | if (link == ScriptBaseClass.LINK_ROOT) | ||
9139 | return ClearPrimMedia(m_host.ParentGroup.RootPart, face); | ||
9140 | else if (link == ScriptBaseClass.LINK_THIS) | ||
9141 | return ClearPrimMedia(m_host, face); | ||
9142 | else | ||
9143 | { | ||
9144 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link); | ||
9145 | if (null != part) | ||
9146 | return ClearPrimMedia(part, face); | ||
9147 | } | ||
9148 | |||
9149 | return ScriptBaseClass.LSL_STATUS_NOT_FOUND; | ||
9150 | } | ||
9151 | |||
9152 | private LSL_Integer ClearPrimMedia(SceneObjectPart part, LSL_Integer face) | ||
9153 | { | ||
9070 | // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid | 9154 | // LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid |
9071 | // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this. | 9155 | // Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this. |
9072 | // FIXME: Don't perform the media check directly | 9156 | // FIXME: Don't perform the media check directly |
9073 | if (face < 0 || face > m_host.GetNumberOfSides() - 1) | 9157 | if (face < 0 || face > part.GetNumberOfSides() - 1) |
9074 | return ScriptBaseClass.LSL_STATUS_OK; | 9158 | return ScriptBaseClass.LSL_STATUS_NOT_FOUND; |
9075 | 9159 | ||
9076 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); | 9160 | IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>(); |
9077 | if (null == module) | 9161 | if (null == module) |
9078 | throw new Exception("Media on a prim functions not available"); | 9162 | return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED; |
9079 | 9163 | ||
9080 | module.ClearMediaEntry(m_host, face); | 9164 | module.ClearMediaEntry(part, face); |
9081 | 9165 | ||
9082 | return ScriptBaseClass.LSL_STATUS_OK; | 9166 | return ScriptBaseClass.LSL_STATUS_OK; |
9083 | } | 9167 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a9b8e04..ecc5fb5 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"); |
@@ -2786,7 +2811,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2786 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); | 2811 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); |
2787 | m_host.AddScriptLPS(1); | 2812 | m_host.AddScriptLPS(1); |
2788 | ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); | 2813 | ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); |
2789 | avatar.SpeedModifier = (float)SpeedModifier; | 2814 | |
2815 | if (avatar != null) | ||
2816 | avatar.SpeedModifier = (float)SpeedModifier; | ||
2790 | } | 2817 | } |
2791 | 2818 | ||
2792 | public void osKickAvatar(string FirstName,string SurName,string alert) | 2819 | 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 | { |