mantis 8704: fix issues on YEngine
parent
5167bd097b
commit
fffac7d531
|
@ -78,6 +78,16 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
inst.Die();
|
||||
}
|
||||
|
||||
public void SetLSLTimer(double time)
|
||||
{
|
||||
m_timer = time;
|
||||
}
|
||||
|
||||
public double getLSLTimer()
|
||||
{
|
||||
return(m_timer);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Seat avatar on prim.
|
||||
* @param owner = true: owner of prim script is running in
|
||||
|
@ -218,6 +228,10 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
// do not do llResetScript on entry
|
||||
if(eventCode == ScriptEventCode.state_entry && stateCode == 0)
|
||||
return;
|
||||
|
||||
if (m_XMRLSLApi != null)
|
||||
m_XMRLSLApi.llResetTime();
|
||||
|
||||
// do clear the events queue on reset
|
||||
ClearQueue();
|
||||
//ClearQueueExceptLinkMessages();
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.ScriptEngine.Shared;
|
||||
using OpenSim.Region.ScriptEngine.Shared.Api;
|
||||
using log4net;
|
||||
|
@ -115,6 +116,14 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
m_RunOnePhase = "GetExecutionState D";
|
||||
CheckRunLockInvariants(true);
|
||||
|
||||
if(m_XMRLSLApi != null)
|
||||
{
|
||||
double scriptTime = Util.GetTimeStampMS() - m_XMRLSLApi.getLSLTimer();
|
||||
XmlElement scriptTimeN = doc.CreateElement("", "scrpTime", "");
|
||||
scriptTimeN.AppendChild(doc.CreateTextNode(scriptTime.ToString()));
|
||||
scriptStateN.AppendChild(scriptTimeN);
|
||||
}
|
||||
|
||||
if (m_minEventDelay != 0.0)
|
||||
{
|
||||
XmlElement minEventDelayN = doc.CreateElement("", "mEvtDly", "");
|
||||
|
|
|
@ -529,6 +529,15 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
XmlElement doGblInitN = (XmlElement)scriptStateN.SelectSingleNode("DoGblInit");
|
||||
doGblInit = bool.Parse(doGblInitN.InnerText);
|
||||
|
||||
if (m_XMRLSLApi != null)
|
||||
{
|
||||
XmlElement scpttimeN = (XmlElement)scriptStateN.SelectSingleNode("scrpTime");
|
||||
if (scpttimeN != null && Double.TryParse(scpttimeN.InnerText, out double t))
|
||||
{
|
||||
m_XMRLSLApi.SetLSLTimer(Util.GetTimeStampMS() - t);
|
||||
}
|
||||
}
|
||||
|
||||
double minEventDelay = 0.0;
|
||||
XmlElement minEventDelayN = (XmlElement)scriptStateN.SelectSingleNode("mEvtDly");
|
||||
if (minEventDelayN != null)
|
||||
|
|
|
@ -874,6 +874,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
ReleaseControlsOrPermissions(true);
|
||||
m_Part.CollisionSound = UUID.Zero;
|
||||
|
||||
if (m_XMRLSLApi != null)
|
||||
m_XMRLSLApi.llResetTime();
|
||||
|
||||
m_RunOnePhase = "ResetLocked: removing script";
|
||||
IUrlModule urlModule = m_Engine.World.RequestModuleInterface<IUrlModule>();
|
||||
if(urlModule != null)
|
||||
|
|
Loading…
Reference in New Issue