aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs26
1 files changed, 18 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 614872e..c83df4e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2584,18 +2584,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2584 CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); 2584 CheckThreatLevel(ThreatLevel.High, "osNpcRemove");
2585 m_host.AddScriptLPS(1); 2585 m_host.AddScriptLPS(1);
2586 2586
2587 ManualResetEvent ev = new ManualResetEvent(false);
2588
2587 Util.FireAndForget(delegate(object x) { 2589 Util.FireAndForget(delegate(object x) {
2588 INPCModule module = World.RequestModuleInterface<INPCModule>(); 2590 try
2589 if (module != null)
2590 { 2591 {
2591 UUID npcId = new UUID(npc.m_string); 2592 INPCModule module = World.RequestModuleInterface<INPCModule>();
2593 if (module != null)
2594 {
2595 UUID npcId = new UUID(npc.m_string);
2592 2596
2593 if (!module.CheckPermissions(npcId, m_host.OwnerID)) 2597 if (!module.CheckPermissions(npcId, m_host.OwnerID))
2594 return; 2598 return;
2595 2599
2596 module.DeleteNPC(npcId, World); 2600 module.DeleteNPC(npcId, World);
2597 }); 2601 }
2598 } 2602 }
2603 finally
2604 {
2605 ev.Set();
2606 }
2607 });
2608 ev.WaitOne();
2599 } 2609 }
2600 2610
2601 public void osNpcPlayAnimation(LSL_Key npc, string animation) 2611 public void osNpcPlayAnimation(LSL_Key npc, string animation)