change llGetTime() source clock
parent
6bc76860d1
commit
d07f48605f
|
@ -113,7 +113,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
protected float m_MinTimerInterval = 0.5f;
|
||||
protected float m_recoilScaleFactor = 0.0f;
|
||||
|
||||
protected DateTime m_timer = DateTime.Now;
|
||||
protected double m_timer = Util.GetTimeStampMS();
|
||||
protected bool m_waitingForScriptAnswer = false;
|
||||
protected bool m_automaticLinkPermission = false;
|
||||
protected IMessageTransferModule m_TransferModule = null;
|
||||
|
@ -3048,22 +3048,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public LSL_Float llGetTime()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
TimeSpan ScriptTime = DateTime.Now - m_timer;
|
||||
return (double)(ScriptTime.TotalMilliseconds / 1000);
|
||||
double ScriptTime = Util.GetTimeStampMS() - m_timer;
|
||||
return (ScriptTime / 1000.0);
|
||||
}
|
||||
|
||||
public void llResetTime()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_timer = DateTime.Now;
|
||||
m_timer = Util.GetTimeStampMS();
|
||||
}
|
||||
|
||||
public LSL_Float llGetAndResetTime()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
TimeSpan ScriptTime = DateTime.Now - m_timer;
|
||||
m_timer = DateTime.Now;
|
||||
return (double)(ScriptTime.TotalMilliseconds / 1000);
|
||||
double now = Util.GetTimeStampMS();
|
||||
double ScriptTime = now - m_timer;
|
||||
m_timer = now;
|
||||
return (ScriptTime / 1000.0);
|
||||
}
|
||||
|
||||
public void llSound(string sound, double volume, int queue, int loop)
|
||||
|
@ -14544,7 +14545,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
bool checkNonPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_NONPHYSICAL) == ScriptBaseClass.RC_REJECT_NONPHYSICAL);
|
||||
bool checkPhysical = !((rejectTypes & ScriptBaseClass.RC_REJECT_PHYSICAL) == ScriptBaseClass.RC_REJECT_PHYSICAL);
|
||||
|
||||
|
||||
if (World.SupportsRayCastFiltered())
|
||||
{
|
||||
if (dist == 0)
|
||||
|
@ -14704,7 +14704,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
}
|
||||
|
||||
list.Add(new LSL_Integer(values));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue