aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs56
3 files changed, 49 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
index 343cdb5..c52d586 100644
--- a/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Combat/CombatModule.cs
@@ -182,6 +182,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
182 try 182 try
183 { 183 {
184 ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 184 ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
185 if (obj == null)
186 return;
185 if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0 187 if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0
186 || avatar.Scene.RegionInfo.RegionSettings.AllowDamage) 188 || avatar.Scene.RegionInfo.RegionSettings.AllowDamage)
187 { 189 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 2fb073d..275b608 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -231,6 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
231 ItemID = ScriptTask.ItemID; 231 ItemID = ScriptTask.ItemID;
232 AssetID = ScriptTask.AssetID; 232 AssetID = ScriptTask.AssetID;
233 } 233 }
234 LocalID = part.LocalId;
234 235
235 PrimName = part.ParentGroup.Name; 236 PrimName = part.ParentGroup.Name;
236 StartParam = startParam; 237 StartParam = startParam;
@@ -1240,4 +1241,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1240 return null; 1241 return null;
1241 } 1242 }
1242 } 1243 }
1243} \ No newline at end of file 1244}
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 9d1e143..27d7674 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1316,13 +1316,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1316 1316
1317 ScriptInstance instance = null; 1317 ScriptInstance instance = null;
1318 // Create the object record 1318 // Create the object record
1319 UUID appDomain = assetID;
1320
1321
1322
1319 lockScriptsForRead(true); 1323 lockScriptsForRead(true);
1320 if ((!m_Scripts.ContainsKey(itemID)) || 1324 if ((!m_Scripts.ContainsKey(itemID)) ||
1321 (m_Scripts[itemID].AssetID != assetID)) 1325 (m_Scripts[itemID].AssetID != assetID))
1322 { 1326 {
1323 lockScriptsForRead(false); 1327 lockScriptsForRead(false);
1324 1328 instance = new ScriptInstance(this, part,
1325 UUID appDomain = assetID; 1329 item,
1330 startParam, postOnRez,
1331 m_MaxScriptQueue);
1332
1333
1326 1334
1327 if (part.ParentGroup.IsAttachment) 1335 if (part.ParentGroup.IsAttachment)
1328 appDomain = part.ParentGroup.RootPart.UUID; 1336 appDomain = part.ParentGroup.RootPart.UUID;
@@ -1345,9 +1353,39 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1345 sandbox = AppDomain.CreateDomain( 1353 sandbox = AppDomain.CreateDomain(
1346 m_Scene.RegionInfo.RegionID.ToString(), 1354 m_Scene.RegionInfo.RegionID.ToString(),
1347 evidence, appSetup); 1355 evidence, appSetup);
1348 m_AppDomains[appDomain].AssemblyResolve += 1356 if (m_AppDomains.ContainsKey(appDomain))
1349 new ResolveEventHandler( 1357 {
1350 AssemblyResolver.OnAssemblyResolve); 1358 m_AppDomains[appDomain].AssemblyResolve +=
1359 new ResolveEventHandler(
1360 AssemblyResolver.OnAssemblyResolve);
1361 if (m_DomainScripts.ContainsKey(appDomain))
1362 {
1363 m_DomainScripts[appDomain].Add(itemID);
1364 }
1365 else
1366 {
1367 m_DomainScripts.Add(appDomain, new List<UUID>());
1368 m_DomainScripts[appDomain].Add(itemID);
1369 }
1370 }
1371 else
1372 {
1373 m_AppDomains.Add(appDomain, sandbox);
1374 m_AppDomains[appDomain].AssemblyResolve +=
1375 new ResolveEventHandler(
1376 AssemblyResolver.OnAssemblyResolve);
1377 if (m_DomainScripts.ContainsKey(appDomain))
1378 {
1379 m_DomainScripts[appDomain].Add(itemID);
1380 }
1381 else
1382 {
1383 m_DomainScripts.Add(appDomain, new List<UUID>());
1384 m_DomainScripts[appDomain].Add(itemID);
1385 }
1386
1387 }
1388
1351 } 1389 }
1352 else 1390 else
1353 { 1391 {
@@ -1373,12 +1411,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1373 return false; 1411 return false;
1374 } 1412 }
1375 } 1413 }
1376 m_DomainScripts[appDomain].Add(itemID); 1414
1377
1378 instance = new ScriptInstance(this, part,
1379 item,
1380 startParam, postOnRez,
1381 m_MaxScriptQueue);
1382 1415
1383 instance.Load(m_AppDomains[appDomain], assembly, stateSource); 1416 instance.Load(m_AppDomains[appDomain], assembly, stateSource);
1384// m_log.DebugFormat( 1417// m_log.DebugFormat(
@@ -1502,6 +1535,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
1502 if (handlerObjectRemoved != null) 1535 if (handlerObjectRemoved != null)
1503 { 1536 {
1504 SceneObjectPart part = m_Scene.GetSceneObjectPart(localID); 1537 SceneObjectPart part = m_Scene.GetSceneObjectPart(localID);
1538 if (part != null)
1505 handlerObjectRemoved(part.UUID); 1539 handlerObjectRemoved(part.UUID);
1506 } 1540 }
1507 1541