diff options
author | Melanie | 2012-03-03 09:58:57 +0000 |
---|---|---|
committer | Melanie | 2012-03-03 09:58:57 +0000 |
commit | 1f32730798c7633bbed47736a1b302dcd13ce903 (patch) | |
tree | 2456fc1135e91e56e0d17d9fbe67f147b7f5fda2 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove outdated comment about checking attachment prims in Scene.PipeEventsFo... (diff) | |
download | opensim-SC-1f32730798c7633bbed47736a1b302dcd13ce903.zip opensim-SC-1f32730798c7633bbed47736a1b302dcd13ce903.tar.gz opensim-SC-1f32730798c7633bbed47736a1b302dcd13ce903.tar.bz2 opensim-SC-1f32730798c7633bbed47736a1b302dcd13ce903.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Servers/VersionInfo.cs
OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
5 files changed, 40 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a6a2aa7..8708b99 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 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e29ab95..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"); |
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/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/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 | { |