diff options
author | UbitUmarov | 2019-04-01 01:48:23 +0100 |
---|---|---|
committer | UbitUmarov | 2019-04-01 01:48:23 +0100 |
commit | 772aa5234a144486d1b2dd1a70fd403cacb9b767 (patch) | |
tree | 5e56c334d68273f219922a0b25e1216b794e058a | |
parent | rez npcs attachments async again (diff) | |
download | opensim-SC-772aa5234a144486d1b2dd1a70fd403cacb9b767.zip opensim-SC-772aa5234a144486d1b2dd1a70fd403cacb9b767.tar.gz opensim-SC-772aa5234a144486d1b2dd1a70fd403cacb9b767.tar.bz2 opensim-SC-772aa5234a144486d1b2dd1a70fd403cacb9b767.tar.xz |
Yengine: clear events queue on reset. Also keep clearing all on state change. (Linked message events are deleted at sl)
-rw-r--r-- | OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs index 7fc97e9..7ef1b9f 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs | |||
@@ -218,7 +218,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
218 | // do not do llResetScript on entry | 218 | // do not do llResetScript on entry |
219 | if(eventCode == ScriptEventCode.state_entry && stateCode == 0) | 219 | if(eventCode == ScriptEventCode.state_entry && stateCode == 0) |
220 | return; | 220 | return; |
221 | ClearQueueExceptLinkMessages(); | 221 | // do clear the events queue on reset |
222 | ClearQueue(); | ||
223 | //ClearQueueExceptLinkMessages(); | ||
222 | throw new ScriptResetException(); | 224 | throw new ScriptResetException(); |
223 | } | 225 | } |
224 | 226 | ||
@@ -583,6 +585,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
583 | * Tell outer layers to cancel any event triggers, like llListen(), | 585 | * Tell outer layers to cancel any event triggers, like llListen(), |
584 | * then tell outer layers which events the new state has handlers for. | 586 | * then tell outer layers which events the new state has handlers for. |
585 | * We also clear the event queue as per http://wiki.secondlife.com/wiki/State | 587 | * We also clear the event queue as per http://wiki.secondlife.com/wiki/State |
588 | * old scripts may want linked messages, but that is not as SL does now | ||
586 | */ | 589 | */ |
587 | public override void StateChange() | 590 | public override void StateChange() |
588 | { | 591 | { |
@@ -595,7 +598,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
595 | // Tell whoever cares which event handlers the new state has. | 598 | // Tell whoever cares which event handlers the new state has. |
596 | m_Part.SetScriptEvents(m_ItemID, GetStateEventFlags(stateCode)); | 599 | m_Part.SetScriptEvents(m_ItemID, GetStateEventFlags(stateCode)); |
597 | 600 | ||
598 | // Clear out any old events from the queue. | 601 | // keep link messages |
602 | //ClearQueueExceptLinkMessages(); | ||
603 | // or Clear out all old events from the queue. | ||
599 | lock(m_QueueLock) | 604 | lock(m_QueueLock) |
600 | { | 605 | { |
601 | m_EventQueue.Clear(); | 606 | m_EventQueue.Clear(); |