Merge branch 'master' into careminster-presence-refactor
commit
d2e4f2d376
|
@ -295,26 +295,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString(), this, delegate(string id, object sender, AssetBase asset)
|
AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString());
|
||||||
{
|
|
||||||
if (null == asset)
|
if (null == asset)
|
||||||
{
|
{
|
||||||
string msg = String.Format("asset ID {0} could not be found", item.AssetID);
|
string msg = String.Format("asset ID {0} could not be found", item.AssetID);
|
||||||
StoreScriptError(item.ItemID, msg);
|
StoreScriptError(item.ItemID, msg);
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[PRIM INVENTORY]: " +
|
"[PRIM INVENTORY]: " +
|
||||||
"Couldn't start script {0}, {1} at {2} in {3} since {4}",
|
"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,
|
item.Name, item.ItemID, m_part.AbsolutePosition,
|
||||||
m_part.ParentGroup.Scene.RegionInfo.RegionName, msg);
|
m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_part.ParentGroup.m_savedScriptState != null)
|
if (m_part.ParentGroup.m_savedScriptState != null)
|
||||||
RestoreSavedScriptState(item.OldItemID, item.ItemID);
|
RestoreSavedScriptState(item.OldItemID, item.ItemID);
|
||||||
m_items.LockItemsForWrite(true);
|
|
||||||
|
lock (m_items)
|
||||||
|
{
|
||||||
m_items[item.ItemID].PermsMask = 0;
|
m_items[item.ItemID].PermsMask = 0;
|
||||||
m_items[item.ItemID].PermsGranter = UUID.Zero;
|
m_items[item.ItemID].PermsGranter = UUID.Zero;
|
||||||
m_items.LockItemsForWrite(false);
|
}
|
||||||
|
|
||||||
string script = Utils.BytesToString(asset.Data);
|
string script = Utils.BytesToString(asset.Data);
|
||||||
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
|
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
|
||||||
m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
|
m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
|
||||||
|
@ -322,11 +324,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_part.ParentGroup.AddActiveScriptCount(1);
|
m_part.ParentGroup.AddActiveScriptCount(1);
|
||||||
m_part.ScheduleFullUpdate();
|
m_part.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
StoreScriptError(item.ItemID, "scripts disabled");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
private bool m_startedFromSavedState;
|
private bool m_startedFromSavedState;
|
||||||
private UUID m_CurrentStateHash;
|
private UUID m_CurrentStateHash;
|
||||||
private UUID m_RegionID;
|
private UUID m_RegionID;
|
||||||
private bool m_Suspended = true;
|
private bool m_Suspended = false;
|
||||||
|
|
||||||
private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
|
private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
|
||||||
m_LineMap;
|
m_LineMap;
|
||||||
|
|
Loading…
Reference in New Issue