Start scripts in attachments only after a successful attach. Elimininate
a gratuitious asset fetch when region crossing.0.6.1-post-fixes
parent
b8e8a33d60
commit
af5e9147f0
|
@ -2088,10 +2088,11 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
}
|
||||
|
||||
// Fire on_rez
|
||||
group.CreateScriptInstances(0, true, DefaultScriptEngine, 0);
|
||||
|
||||
if (!attachment)
|
||||
{
|
||||
group.CreateScriptInstances(0, true, DefaultScriptEngine, 0);
|
||||
rootPart.ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
if (!Permissions.BypassPermissions())
|
||||
{
|
||||
|
|
|
@ -472,6 +472,10 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
objatt.ScheduleGroupForFullUpdate();
|
||||
if (tainted)
|
||||
objatt.HasGroupChanged = true;
|
||||
|
||||
// Fire after attach, so we don't get messy perms dialogs
|
||||
//
|
||||
objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 0);
|
||||
}
|
||||
return objatt;
|
||||
}
|
||||
|
|
|
@ -241,6 +241,15 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts)
|
||||
{
|
||||
if (stateSource == 1) // Prim crossing
|
||||
{
|
||||
m_items[item.ItemID].PermsMask = 0;
|
||||
m_items[item.ItemID].PermsGranter = UUID.Zero;
|
||||
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
|
||||
m_part.LocalId, item.ItemID, String.Empty, startParam, postOnRez, engine, stateSource);
|
||||
m_part.ParentGroup.AddActiveScriptCount(1);
|
||||
m_part.ScheduleFullUpdate();
|
||||
}
|
||||
AssetCache cache = m_part.ParentGroup.Scene.AssetCache;
|
||||
|
||||
cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset)
|
||||
|
|
|
@ -286,6 +286,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
|
|||
}
|
||||
}
|
||||
|
||||
if (Script == String.Empty)
|
||||
{
|
||||
if (File.Exists(OutFile))
|
||||
|
||||
{
|
||||
m_scriptEngine.Log.DebugFormat("[Compiler] Returning existing assembly for {0}", asset);
|
||||
return OutFile;
|
||||
}
|
||||
|
||||
throw new Exception("Cannot find script assembly and no script text present");
|
||||
}
|
||||
|
||||
enumCompileType l = DefaultCompileLanguage;
|
||||
|
||||
if (Script.StartsWith("//c#", true, CultureInfo.InvariantCulture))
|
||||
|
|
Loading…
Reference in New Issue