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:
Melanie
2012-03-03 09:58:57 +00:00
28 changed files with 275 additions and 322 deletions

View File

@@ -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();
}

View File

@@ -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");

View File

@@ -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;
}
}

View File

@@ -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();

View File

@@ -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()
{