diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 8155b44616..d9ebd14308 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -248,10 +248,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // Replace and Script = - Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*,[^,>]*)>", @"new LSL_Types.Quaternion($1)", + Regex.Replace(Script, @"<([^,>;\)]*,[^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Quaternion($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); Script = - Regex.Replace(Script, @"<([^,>]*,[^,>]*,[^,>]*)>", @"new LSL_Types.Vector3($1)", + Regex.Replace(Script, @"<([^,>;\)]*,[^,>;\)]*,[^,>;\)]*)>", @"new LSL_Types.Vector3($1)", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.Singleline); // Replace List []'s @@ -317,4 +317,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL return Return; } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 40c6533029..8563694dcf 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs @@ -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 + "]"); } + private DateTime m_timer = DateTime.Now; private string m_state = "default"; public string State() @@ -843,19 +844,20 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler public double llGetTime() { - NotImplemented("llGetTime"); - return 0; + TimeSpan ScriptTime = DateTime.Now - m_timer; + return (double)(ScriptTime.TotalMilliseconds / 1000); } public void llResetTime() { - NotImplemented("llResetTime"); + m_timer = DateTime.Now; } public double llGetAndResetTime() { - NotImplemented("llGetAndResetTime"); - return 0; + TimeSpan ScriptTime = DateTime.Now - m_timer; + m_timer = DateTime.Now; + return (double)(ScriptTime.TotalMilliseconds / 1000); } public void llSound()