corrected llResetScript according to description within LSL wiki

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
inv-download
Freaky Tech 2015-03-02 20:59:02 +01:00 committed by BlueWall
parent bf96f06d1e
commit b8157174ca
1 changed files with 2 additions and 1 deletions

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",