diff options
author | idb | 2008-12-14 17:48:27 +0000 |
---|---|---|
committer | idb | 2008-12-14 17:48:27 +0000 |
commit | 7c6c4435035e1cd2693f1535d1ea25d934b0f86b (patch) | |
tree | 6832d883b64868f5f1d0ce19dc9b8393ea02a44b | |
parent | * Implements the torque/Rotational Impulse methods in the PhysicsAPI and the ... (diff) | |
download | opensim-SC_OLD-7c6c4435035e1cd2693f1535d1ea25d934b0f86b.zip opensim-SC_OLD-7c6c4435035e1cd2693f1535d1ea25d934b0f86b.tar.gz opensim-SC_OLD-7c6c4435035e1cd2693f1535d1ea25d934b0f86b.tar.bz2 opensim-SC_OLD-7c6c4435035e1cd2693f1535d1ea25d934b0f86b.tar.xz |
Remove use of time dilation in llGetTimeOfDay, llGetTime and llGetAndResetTime.
It is not documented to be applied to llGetTimeOfDay at all and is not appropriate for the other two because dilation does not directly affect script speed in OS.
Fixes Mantis #2783 and #2162
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 84def93..ab7e934 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1996,7 +1996,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1996 | public LSL_Float llGetTimeOfDay() | 1996 | public LSL_Float llGetTimeOfDay() |
1997 | { | 1997 | { |
1998 | m_host.AddScriptLPS(1); | 1998 | m_host.AddScriptLPS(1); |
1999 | return (double)(((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)) * World.TimeDilation); | 1999 | return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); |
2000 | } | 2000 | } |
2001 | 2001 | ||
2002 | public LSL_Float llGetWallclock() | 2002 | public LSL_Float llGetWallclock() |
@@ -2009,7 +2009,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2009 | { | 2009 | { |
2010 | m_host.AddScriptLPS(1); | 2010 | m_host.AddScriptLPS(1); |
2011 | TimeSpan ScriptTime = DateTime.Now - m_timer; | 2011 | TimeSpan ScriptTime = DateTime.Now - m_timer; |
2012 | return (double)((ScriptTime.TotalMilliseconds / 1000)*World.TimeDilation); | 2012 | return (double)(ScriptTime.TotalMilliseconds / 1000); |
2013 | } | 2013 | } |
2014 | 2014 | ||
2015 | public void llResetTime() | 2015 | public void llResetTime() |
@@ -2023,7 +2023,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2023 | m_host.AddScriptLPS(1); | 2023 | m_host.AddScriptLPS(1); |
2024 | TimeSpan ScriptTime = DateTime.Now - m_timer; | 2024 | TimeSpan ScriptTime = DateTime.Now - m_timer; |
2025 | m_timer = DateTime.Now; | 2025 | m_timer = DateTime.Now; |
2026 | return (double)((ScriptTime.TotalMilliseconds / 1000)*World.TimeDilation); | 2026 | return (double)(ScriptTime.TotalMilliseconds / 1000); |
2027 | } | 2027 | } |
2028 | 2028 | ||
2029 | public void llSound(string sound, double volume, int queue, int loop) | 2029 | public void llSound(string sound, double volume, int queue, int loop) |