Implement CHANGED_REGION_(RE)START and also fix various CHANGED_* constants which had the wrong values (checked using LSL in SL). This addresses mantis #217 and mantis #53.

This commit is contained in:
Tom
2010-08-06 02:39:42 -07:00
parent 0eda6714f3
commit c5c6627adb
6 changed files with 28 additions and 11 deletions

View File

@@ -321,6 +321,22 @@ namespace OpenSim.Region.Framework.Scenes
StoreScriptErrors(item.ItemID, null);
m_part.ParentGroup.AddActiveScriptCount(1);
m_part.ScheduleFullUpdate();
//This should play nice with XEngine since XEngine loads scripts /after/ the region starts
if (stateSource == 0 && m_part.ParentGroup.Scene.LoginsDisabled == true)
{
IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
if (engines != null)
{
foreach (IScriptModule xengine in engines)
{
if (xengine != null)
{
xengine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.REGION_RESTART });
}
}
}
}
}
}
}