Again, thanks to Alondria for: adding llGetTime, llResetTime, and llGetAndResetTime.
Also for fixing Rot/Vector Regex from being too greedy by removing bug in the LSL->C# converter that was causing the vector and rotation parser.afrisby
parent
9ed2b26232
commit
9ca70e029a
|
@ -248,10 +248,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||||
|
|
||||||
// Replace <x,y,z> and <x,y,z,r>
|
// Replace <x,y,z> and <x,y,z,r>
|
||||||
Script =
|
Script =
|
||||||
Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new LSL_Types.Quaternion($1)",
|
Regex.Replace(Script, @"<([^,>;\)]*,[^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Quaternion($1)",
|
||||||
RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
|
RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
|
||||||
Script =
|
Script =
|
||||||
Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*)>", @"new LSL_Types.Vector3($1)",
|
Regex.Replace(Script, @"<([^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Vector3($1)",
|
||||||
RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
|
RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline);
|
||||||
|
|
||||||
// Replace List []'s
|
// Replace List []'s
|
||||||
|
|
|
@ -69,6 +69,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
|
||||||
//MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]");
|
//MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private DateTime m_timer = DateTime.Now;
|
||||||
private string m_state = "default";
|
private string m_state = "default";
|
||||||
|
|
||||||
public string State()
|
public string State()
|
||||||
|
@ -843,19 +844,20 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
|
||||||
|
|
||||||
public double llGetTime()
|
public double llGetTime()
|
||||||
{
|
{
|
||||||
NotImplemented("llGetTime");
|
TimeSpan ScriptTime = DateTime.Now - m_timer;
|
||||||
return 0;
|
return (double)(ScriptTime.TotalMilliseconds / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llResetTime()
|
public void llResetTime()
|
||||||
{
|
{
|
||||||
NotImplemented("llResetTime");
|
m_timer = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double llGetAndResetTime()
|
public double llGetAndResetTime()
|
||||||
{
|
{
|
||||||
NotImplemented("llGetAndResetTime");
|
TimeSpan ScriptTime = DateTime.Now - m_timer;
|
||||||
return 0;
|
m_timer = DateTime.Now;
|
||||||
|
return (double)(ScriptTime.TotalMilliseconds / 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llSound()
|
public void llSound()
|
||||||
|
|
Loading…
Reference in New Issue