diff options
author | Charles Krinke | 2007-12-14 16:10:56 +0000 |
---|---|---|
committer | Charles Krinke | 2007-12-14 16:10:56 +0000 |
commit | 9ca70e029aed533a2cd702e4b21ed937f49b7aa8 (patch) | |
tree | 1c406c574fd7617600c32bfa049fba44bcd1f416 /OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |
parent | * Just making Create public (diff) | |
download | opensim-SC_OLD-9ca70e029aed533a2cd702e4b21ed937f49b7aa8.zip opensim-SC_OLD-9ca70e029aed533a2cd702e4b21ed937f49b7aa8.tar.gz opensim-SC_OLD-9ca70e029aed533a2cd702e4b21ed937f49b7aa8.tar.bz2 opensim-SC_OLD-9ca70e029aed533a2cd702e4b21ed937f49b7aa8.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | 12 |
1 files changed, 7 insertions, 5 deletions
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 40c6533..8563694 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 | |||
69 | //MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); | 69 | //MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); |
70 | } | 70 | } |
71 | 71 | ||
72 | private DateTime m_timer = DateTime.Now; | ||
72 | private string m_state = "default"; | 73 | private string m_state = "default"; |
73 | 74 | ||
74 | public string State() | 75 | public string State() |
@@ -843,19 +844,20 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler | |||
843 | 844 | ||
844 | public double llGetTime() | 845 | public double llGetTime() |
845 | { | 846 | { |
846 | NotImplemented("llGetTime"); | 847 | TimeSpan ScriptTime = DateTime.Now - m_timer; |
847 | return 0; | 848 | return (double)(ScriptTime.TotalMilliseconds / 1000); |
848 | } | 849 | } |
849 | 850 | ||
850 | public void llResetTime() | 851 | public void llResetTime() |
851 | { | 852 | { |
852 | NotImplemented("llResetTime"); | 853 | m_timer = DateTime.Now; |
853 | } | 854 | } |
854 | 855 | ||
855 | public double llGetAndResetTime() | 856 | public double llGetAndResetTime() |
856 | { | 857 | { |
857 | NotImplemented("llGetAndResetTime"); | 858 | TimeSpan ScriptTime = DateTime.Now - m_timer; |
858 | return 0; | 859 | m_timer = DateTime.Now; |
860 | return (double)(ScriptTime.TotalMilliseconds / 1000); | ||
859 | } | 861 | } |
860 | 862 | ||
861 | public void llSound() | 863 | public void llSound() |