diff options
author | Justin Clarke Casey | 2008-09-19 19:07:20 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-19 19:07:20 +0000 |
commit | fb5014cf5b9d7044aafcf7b11cbddb69a5119649 (patch) | |
tree | 06a8c1be6520db5fa801f5f7b638a5741691c156 /OpenSim/Region/ScriptEngine/Shared | |
parent | * Remove one possible deadlock situation as seen today (diff) | |
download | opensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.zip opensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.tar.gz opensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.tar.bz2 opensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.tar.xz |
* Duh, forgot I had undone some of the changes I meant to include in the previous commit
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 17 |
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 |