Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-04-19 15:33:20 +01:00
commit d2e4f2d376
2 changed files with 30 additions and 33 deletions

View File

@ -295,38 +295,35 @@ namespace OpenSim.Region.Framework.Scenes
return;
}
m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString(), this, delegate(string id, object sender, AssetBase asset)
{
if (null == asset)
{
string msg = String.Format("asset ID {0} could not be found", item.AssetID);
StoreScriptError(item.ItemID, msg);
m_log.ErrorFormat(
"[PRIM INVENTORY]: " +
"Couldn't start script {0}, {1} at {2} in {3} since {4}",
item.Name, item.ItemID, m_part.AbsolutePosition,
m_part.ParentGroup.Scene.RegionInfo.RegionName, msg);
}
else
{
if (m_part.ParentGroup.m_savedScriptState != null)
RestoreSavedScriptState(item.OldItemID, item.ItemID);
m_items.LockItemsForWrite(true);
m_items[item.ItemID].PermsMask = 0;
m_items[item.ItemID].PermsGranter = UUID.Zero;
m_items.LockItemsForWrite(false);
string script = Utils.BytesToString(asset.Data);
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
StoreScriptErrors(item.ItemID, null);
m_part.ParentGroup.AddActiveScriptCount(1);
m_part.ScheduleFullUpdate();
}
});
}
else
{
StoreScriptError(item.ItemID, "scripts disabled");
AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString());
if (null == asset)
{
string msg = String.Format("asset ID {0} could not be found", item.AssetID);
StoreScriptError(item.ItemID, msg);
m_log.ErrorFormat(
"[PRIM INVENTORY]: " +
"Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
item.Name, item.ItemID, m_part.AbsolutePosition,
m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
}
else
{
if (m_part.ParentGroup.m_savedScriptState != null)
RestoreSavedScriptState(item.OldItemID, item.ItemID);
lock (m_items)
{
m_items[item.ItemID].PermsMask = 0;
m_items[item.ItemID].PermsGranter = UUID.Zero;
}
string script = Utils.BytesToString(asset.Data);
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
StoreScriptErrors(item.ItemID, null);
m_part.ParentGroup.AddActiveScriptCount(1);
m_part.ScheduleFullUpdate();
}
}
}

View File

@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
private bool m_startedFromSavedState;
private UUID m_CurrentStateHash;
private UUID m_RegionID;
private bool m_Suspended = true;
private bool m_Suspended = false;
private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
m_LineMap;