aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs17
1 files changed, 5 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 506f0f5..80d7743 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -164,16 +164,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
164 set { m_StartParam = value; } 164 set { m_StartParam = value; }
165 } 165 }
166 166
167 public ScriptInstance(IScriptEngine engine, uint localID, 167 public ScriptInstance(IScriptEngine engine, SceneObjectPart part,
168 UUID objectID, UUID itemID, UUID assetID, string assembly, 168 UUID itemID, UUID assetID, string assembly,
169 AppDomain dom, string primName, string scriptName, 169 AppDomain dom, string primName, string scriptName,
170 int startParam, bool postOnRez, StateSource stateSource, 170 int startParam, bool postOnRez, StateSource stateSource,
171 int maxScriptQueue) 171 int maxScriptQueue)
172 { 172 {
173 m_Engine = engine; 173 m_Engine = engine;
174 174
175 m_LocalID = localID; 175 m_LocalID = part.LocalId;
176 m_ObjectID = objectID; 176 m_ObjectID = part.UUID;
177 m_ItemID = itemID; 177 m_ItemID = itemID;
178 m_AssetID = assetID; 178 m_AssetID = assetID;
179 m_PrimName = primName; 179 m_PrimName = primName;
@@ -184,17 +184,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
184 184
185 ApiManager am = new ApiManager(); 185 ApiManager am = new ApiManager();
186 186
187 SceneObjectPart part=engine.World.GetSceneObjectPart(localID);
188 if (part == null)
189 {
190 engine.Log.Error("[Script] SceneObjectPart unavailable. Script NOT started.");
191 return;
192 }
193
194 foreach (string api in am.GetApis()) 187 foreach (string api in am.GetApis())
195 { 188 {
196 m_Apis[api] = am.CreateApi(api); 189 m_Apis[api] = am.CreateApi(api);
197 m_Apis[api].Initialize(engine, part, localID, itemID); 190 m_Apis[api].Initialize(engine, part, m_LocalID, itemID);
198 } 191 }
199 192
200 try 193 try