corrected llResetScript according to description within LSL wiki

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
This commit is contained in:
Freaky Tech
2015-03-02 20:59:02 +01:00
committed by BlueWall
parent bf96f06d1e
commit b8157174ca

View File

@@ -970,12 +970,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
EventQueue.Clear();
m_Script.ResetVars();
string oldState = State;
State = "default";
Part.SetScriptEvents(ItemID,
(int)m_Script.GetStateEventFlags(State));
if (m_CurrentEvent != "state_entry")
if (m_CurrentEvent != "state_entry" || oldState != "default")
{
m_SaveState = StatePersistedHere;
PostEvent(new EventParams("state_entry",