mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/Servers/VersionInfo.cs OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs
This commit is contained in:
@@ -4450,7 +4450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f),
|
||||
Util.Clip((float)color.y, 0.0f, 1.0f),
|
||||
Util.Clip((float)color.z, 0.0f, 1.0f));
|
||||
m_host.SetText(text.Length > 254 ? text.Remove(255) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
|
||||
m_host.SetText(text.Length > 254 ? text.Remove(254) : text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
|
||||
//m_host.ParentGroup.HasGroupChanged = true;
|
||||
//m_host.ParentGroup.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
|
||||
@@ -2169,6 +2169,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return result;
|
||||
}
|
||||
|
||||
public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.High, "osReplaceString");
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
// Normalize indices (if negative).
|
||||
// After normlaization they may still be
|
||||
// negative, but that is now relative to
|
||||
// the start, rather than the end, of the
|
||||
// sequence.
|
||||
if (start < 0)
|
||||
{
|
||||
start = src.Length + start;
|
||||
}
|
||||
|
||||
if (start < 0 || start >= src.Length)
|
||||
{
|
||||
return src;
|
||||
}
|
||||
|
||||
// Find matches beginning at start position
|
||||
Regex matcher = new Regex(pattern);
|
||||
return matcher.Replace(src,replace,count,start);
|
||||
}
|
||||
|
||||
public string osLoadedCreationDate()
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate");
|
||||
|
||||
@@ -157,12 +157,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
public void CheckSenseRepeaterEvents()
|
||||
{
|
||||
// Nothing to do here?
|
||||
if (SenseRepeaters.Count == 0)
|
||||
return;
|
||||
|
||||
lock (SenseRepeatListLock)
|
||||
{
|
||||
// Nothing to do here?
|
||||
if (SenseRepeaters.Count == 0)
|
||||
return;
|
||||
|
||||
// Go through all timers
|
||||
foreach (SenseRepeatClass ts in SenseRepeaters)
|
||||
{
|
||||
@@ -640,7 +640,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
ts.next =
|
||||
DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||
|
||||
SenseRepeaters.Add(ts);
|
||||
lock (SenseRepeatListLock)
|
||||
SenseRepeaters.Add(ts);
|
||||
|
||||
idx += 6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
|
||||
LSL_String osFormatString(string str, LSL_List strings);
|
||||
LSL_List osMatchString(string src, string pattern, int start);
|
||||
LSL_String osReplaceString(string src, string pattern, string replace, int count, int start);
|
||||
|
||||
// Information about data loaded into the region
|
||||
string osLoadedCreationDate();
|
||||
|
||||
@@ -472,6 +472,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osMatchString(src, pattern, start);
|
||||
}
|
||||
|
||||
public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
|
||||
{
|
||||
return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
|
||||
}
|
||||
|
||||
|
||||
// Information about data loaded into the region
|
||||
public string osLoadedCreationDate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user