* Duh, forgot I had undone some of the changes I meant to include in the previous commit
parent
4c7ddd2c71
commit
fb5014cf5b
|
@ -164,16 +164,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
set { m_StartParam = value; }
|
set { m_StartParam = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScriptInstance(IScriptEngine engine, uint localID,
|
public ScriptInstance(IScriptEngine engine, SceneObjectPart part,
|
||||||
UUID objectID, UUID itemID, UUID assetID, string assembly,
|
UUID itemID, UUID assetID, string assembly,
|
||||||
AppDomain dom, string primName, string scriptName,
|
AppDomain dom, string primName, string scriptName,
|
||||||
int startParam, bool postOnRez, StateSource stateSource,
|
int startParam, bool postOnRez, StateSource stateSource,
|
||||||
int maxScriptQueue)
|
int maxScriptQueue)
|
||||||
{
|
{
|
||||||
m_Engine = engine;
|
m_Engine = engine;
|
||||||
|
|
||||||
m_LocalID = localID;
|
m_LocalID = part.LocalId;
|
||||||
m_ObjectID = objectID;
|
m_ObjectID = part.UUID;
|
||||||
m_ItemID = itemID;
|
m_ItemID = itemID;
|
||||||
m_AssetID = assetID;
|
m_AssetID = assetID;
|
||||||
m_PrimName = primName;
|
m_PrimName = primName;
|
||||||
|
@ -184,17 +184,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
|
|
||||||
ApiManager am = new ApiManager();
|
ApiManager am = new ApiManager();
|
||||||
|
|
||||||
SceneObjectPart part=engine.World.GetSceneObjectPart(localID);
|
|
||||||
if (part == null)
|
|
||||||
{
|
|
||||||
engine.Log.Error("[Script] SceneObjectPart unavailable. Script NOT started.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (string api in am.GetApis())
|
foreach (string api in am.GetApis())
|
||||||
{
|
{
|
||||||
m_Apis[api] = am.CreateApi(api);
|
m_Apis[api] = am.CreateApi(api);
|
||||||
m_Apis[api].Initialize(engine, part, localID, itemID);
|
m_Apis[api].Initialize(engine, part, m_LocalID, itemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
|
|
@ -500,8 +500,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
m_DomainScripts[appDomain].Add(itemID);
|
m_DomainScripts[appDomain].Add(itemID);
|
||||||
|
|
||||||
ScriptInstance instance =
|
ScriptInstance instance =
|
||||||
new ScriptInstance(this, part.LocalId,
|
new ScriptInstance(this, part,
|
||||||
part.UUID, itemID, assetID, assembly,
|
itemID, assetID, assembly,
|
||||||
m_AppDomains[appDomain],
|
m_AppDomains[appDomain],
|
||||||
part.ParentGroup.RootPart.Name,
|
part.ParentGroup.RootPart.Name,
|
||||||
item.Name, startParam, postOnRez,
|
item.Name, startParam, postOnRez,
|
||||||
|
|
Loading…
Reference in New Issue