From 7c6c4435035e1cd2693f1535d1ea25d934b0f86b Mon Sep 17 00:00:00 2001 From: idb Date: Sun, 14 Dec 2008 17:48:27 +0000 Subject: 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 --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') 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 public LSL_Float llGetTimeOfDay() { m_host.AddScriptLPS(1); - return (double)(((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)) * World.TimeDilation); + return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); } public LSL_Float llGetWallclock() @@ -2009,7 +2009,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); TimeSpan ScriptTime = DateTime.Now - m_timer; - return (double)((ScriptTime.TotalMilliseconds / 1000)*World.TimeDilation); + return (double)(ScriptTime.TotalMilliseconds / 1000); } public void llResetTime() @@ -2023,7 +2023,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.AddScriptLPS(1); TimeSpan ScriptTime = DateTime.Now - m_timer; m_timer = DateTime.Now; - return (double)((ScriptTime.TotalMilliseconds / 1000)*World.TimeDilation); + return (double)(ScriptTime.TotalMilliseconds / 1000); } public void llSound(string sound, double volume, int queue, int loop) -- cgit v1.1